Displaying 2 results from an estimated 2 matches for "oggstreamst".
Did you mean:
oggstreams
2006 Aug 31
0
OpenAl and Vorbis
...diobuf[count++]=val;
}
}
vorbis_synthesis_read(&vorbisDspState,i);
audiobufFill += i*vorbisInfo.channels*2;
if (audiobufFill == fragsize) audiobufReady = true;
} else {
// no pending audio; is there a pending packet to decode?
if(ogg_stream_packetout(&oggStreamState,&oggPacket)>0){
if(vorbis_synthesis(&vorbisBlock,&oggPacket)==0) // test for success!
vorbis_synthesis_blockin(&vorbisDspState,&vorbisBlock);
}else{ // we need more data; break out to suck in another page
break;
}
}
}
//1)grab new data...
2009 Feb 24
0
any help with pyogg and pyvorbis?
...e
fout = open('out.ogg', 'wb')
inwav = wave.open('in.wav','rb')
channels = inwav.getnchannels()
vd = ogg.vorbis.VorbisInfo(channels = channels,
rate = inwav.getframerate(),
quality = 0.2).analysis_init()
os = ogg.OggStreamState(5)
map(os.packetin, vd.headerout())
og = os.flush()
while og:
og.writeout(fout)
og = os.flush()
nsamples = 1024
eos = 0
total = 0
while not eos:
data = inwav.readframes(nsamples)
total = total + nsamples
if not data:
vd.write(None)
break
vd.write_wav(data...