Displaying 8 results from an estimated 8 matches for "ov_pcm_tell".
2004 Jun 06
2
vorbisfile timestamp oddity
I'm seeing some inconsistency in returned timestamps using vorbisfile.
I open a file, read some data (grabbing timestamps with ov_pcm_tell),
then seek back with ov_pcm_seek(vf, 0) and read it again.
The seek lands back on 0, but on the second read through, there's a gap
in the timestamps: they jumps up by 2112 frames. This causes my vorbisfile
code to insert silence to maintain sync (as if there was a hole), and one
of my test c...
2001 Nov 22
14
Small vorbis files with vorbisfile
...m doing something
stupid. The files are short audio effects for a game (embedded in our own
data format).
Sample info:
Vorbis packets: 1 (4 kb)
Samples: 28672
Samplerate: 22 kHz
Channels: 2
This is what I''m doing when I want to get a number of bytes from the stream:
The problem is that ov_pcm_tell always returns 0. And so does ov_read (its
only one packet so EOF)
virtual bool GetData(void *&_pData, int &_nBytes)
{
int NumTimesNoData = 0;
while(_nBytes)
{
long ret;...
2001 Mar 12
1
ov_pcm_seek
How do I seek back to the beginning of a stream using ov_pcm_seek()?
ov_pcm_seek(0) doesn't seem to do anything, though ov_pcm_tell()
returns 0 right after opening the stream.
I'm now using ov_pcm_seek(1) which seems to work, but I'm not sure
if that's really right. Are PCM offsets meant to be 0 or 1 based? Is
this a bug?
Frank
--
Frank Heckenbach, frank@g-n-u.de
http://fjf.gnu.de/
PGP and GPG keys: http://fjf....
2010 Sep 23
0
How can you synchronise audio with an already-playing stream?
...track.
Currently when I seek and play the second track it is ~0.5s late (it
starts playing immediately, but is offset by ~0.5s).
All files are already stored in their compressed state in memory at the
time the seek request is given. Each playback occurs on its own (OpenAL)
source.
I'm using ov_pcm_tell/ov_pcm_seek to seek the second file to the
position of the first, and have implemented all of ov_callbacks to
facilitate this.
I suspect the problem is related to the time that passes between
querying with _tell and the playing of the second source.
For the benefit of future google searches, I...
2005 Oct 09
1
ov_read_float vs. ov_read
Hello,
Am I missing something?
float** pcm_channels;
int bitstream;
int where = ov_pcm_tell(&vf);
-> The Result is "0";
ov_read_float(&vf, &pcm_channels, 1, &bitstream);
-> pcm_channels[0][0] is "0.000338580"
ov_pcm_seek(&vf, 0);
char* buffer = new char[2];
ov_read(&vf, buffer, sizeof(buffer), 0, 2, 1, &bitstream);
short temp = *((sh...
2001 Oct 04
8
OT: Licence + hi-res logotype
Hello!
I just got _very_ scared. I was certain the Ogg libraries could be used in
commercial products (I know they are used in Star Trek: Away Team and
Operation Flashpoint). I've also been told several times that it's OK, even
if they're not GPL, but now I can't find any info on the sites that tells me
so. Could you please tell me what the deal is (I've used it in a project
2006 Jan 17
1
How to loop a Vobis sound ?
...ucture),
// a pointer to our ogg stream (which the vorbis libs will fill up for us), and our s_callbacks
if (ov_open_callbacks (&m_tOggMemoryFile, &m_tOggStream, NULL, 0, s_callbacks) != 0)
throw string ("Could not read Ogg file from memory");
m_iStreamStart = ov_pcm_tell (&m_tOggStream);
m_bReleaseStream = true;
return true;
}
// ------------- Source.h
class GAL_API Source
{
public:
// 1. Set a loaded buffer as current buffer
void SetCurrentBuffer (Buffer *pBuf);
// 2. operations
virtual bool Play ();
virtual void Stop ()...
2002 Oct 05
2
ogg123 remote interface
...gt;stats.total_time = 0.0;
private->stats.current_time = 0.0;
private->stats.instant_bitrate = 0;
@@ -221,12 +223,16 @@
long instant_bitrate;
long avg_bitrate;
+ priv->stats.total_pcm_samples = ov_pcm_total(&priv->vf, -1);
+ priv->stats.current_pcm_sample = ov_pcm_tell(&priv->vf);
+
+ //fprintf(stderr, "%lld\n", priv->stats.total_pcm_samples);
/* ov_time_tell() doesn't work on non-seekable streams, so we use
ov_pcm_tell() */
- priv->stats.total_time = (double) ov_pcm_total(&priv->vf, -1) /
- (double) decoder->ac...