Mercurial > hg > forks > bilotrip-mj12
diff liboggplayer-src/src/oggplayer.cpp @ 60:9c63b355c82b
Remove the audio code completely.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 06 Aug 2013 23:45:05 +0300 |
parents | 3eacedd172ab |
children |
line wrap: on
line diff
--- a/liboggplayer-src/src/oggplayer.cpp Tue Aug 06 23:27:37 2013 +0300 +++ b/liboggplayer-src/src/oggplayer.cpp Tue Aug 06 23:45:05 2013 +0300 @@ -60,31 +60,6 @@ return imp->playing; } - -#ifdef VORBIS_SUPPORT -int OggPlayer::audio_read(char* buf, unsigned int size) { - if(NULL==buf || !imp->vorbis_p || !playing() || !imp->ready()) return 0; - boost::unique_lock<boost::mutex> lock(imp->audio_mut); - - while ((imp->cirbuf.size() < size) && playing()) { - if(imp->cirbuf.capacity()< size) - { - imp->cirbuf.set_capacity(2*size); - } - imp->audio_ready_cond.wait(lock); - } - - unsigned int k = 0; - while (k < size && !imp->cirbuf.empty()) { - buf[k++] = imp->cirbuf.front(); - imp->cirbuf.pop_front(); - } - imp->audio_bytes_played+=k; - - return k; -} -#endif - bool OggPlayer::yuv_buffer_try_lock(YUVBuffer *buffer) { if (!playing() || !imp->theora_p || !imp->ready()) return false;