comparison liboggplayer-src/src/play.cpp @ 14:083c73ceb716

Get rid of the vorbis related code.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 05 Aug 2013 16:54:46 +0300
parents 105513a2e3c9
children 3eacedd172ab
comparison
equal deleted inserted replaced
13:c859c22c1af5 14:083c73ceb716
6 // return true if need more data 6 // return true if need more data
7 // the return value is strange but the function is 7 // the return value is strange but the function is
8 // for internal use only and should only be called 8 // for internal use only and should only be called
9 // in play() 9 // in play()
10 bool OggPlayer::Imp::decode_audio() { 10 bool OggPlayer::Imp::decode_audio() {
11 #ifdef VORBIS_SUPPORT
11 int ret; 12 int ret;
12 float **pcm; 13 float **pcm;
13 // if there's pending, decoded audio, grab it 14 // if there's pending, decoded audio, grab it
14 while ((ret = vorbis_synthesis_pcmout(&v_state, &pcm)) > 0) { 15 while ((ret = vorbis_synthesis_pcmout(&v_state, &pcm)) > 0) {
15 boost::unique_lock<boost::mutex> lock(audio_mut); 16 boost::unique_lock<boost::mutex> lock(audio_mut);
77 if (vorbis_synthesis(&v_block, &o_packet) == 0) { 78 if (vorbis_synthesis(&v_block, &o_packet) == 0) {
78 vorbis_synthesis_blockin(&v_state, &v_block); 79 vorbis_synthesis_blockin(&v_state, &v_block);
79 return false; 80 return false;
80 } 81 }
81 } else { return true; } 82 } else { return true; }
82 83 #endif
84 return true;
83 } 85 }
84 // similar to decode_audio 86 // similar to decode_audio
85 bool OggPlayer::Imp::decode_video() { 87 bool OggPlayer::Imp::decode_video() {
86 bool was_ready=videobuf_ready; 88 bool was_ready=videobuf_ready;
87 boost::unique_lock<boost::mutex> lock(video_mut, boost::defer_lock); 89 boost::unique_lock<boost::mutex> lock(video_mut, boost::defer_lock);