Created
April 17, 2015 21:54
-
-
Save coldtobi/9a5ddfbe38ae72dc01f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/neo/sound/snd_decoder.cpp b/neo/sound/snd_decoder.cpp | |
index f7040ad..3f83d10 100644 | |
--- a/neo/sound/snd_decoder.cpp | |
+++ b/neo/sound/snd_decoder.cpp | |
@@ -35,6 +35,11 @@ If you have questions concerning this license or the applicable additional terms | |
#include "sound/snd_local.h" | |
+#include <iostream> | |
+ | |
+#include <string> | |
+ | |
+ | |
/* | |
=================================================================================== | |
@@ -448,7 +453,9 @@ void idSampleDecoderLocal::Decode( idSoundSample *sample, int sampleOffset44k, i | |
break; | |
} | |
case WAVE_FORMAT_TAG_OGG: { | |
+ std::cerr << sample->name << " off44k=" << sampleOffset44k << " count44=" << sampleCount44k << std::endl ; | |
readSamples44k = DecodeOGG( sample, sampleOffset44k, sampleCount44k, dest ); | |
+ //std::cerr << "453ret" << std::endl; | |
break; | |
} | |
default: { | |
@@ -537,10 +544,12 @@ int idSampleDecoderLocal::DecodeOGG( idSoundSample *sample, int sampleOffset44k, | |
// seek to the right offset if necessary | |
if ( sampleOffset != lastSampleOffset ) { | |
+ std::cerr << sample->name << " off=" << sampleOffset << " nch=" << sample->objectInfo.nChannels << "..." << std::endl ; | |
if ( ov_pcm_seek( &ogg, sampleOffset / sample->objectInfo.nChannels ) != 0 ) { | |
failed = true; | |
return 0; | |
} | |
+ //std::cerr << ":" <<std::endl; | |
} | |
lastSampleOffset = sampleOffset; | |
diff --git a/neo/sound/snd_emitter.cpp b/neo/sound/snd_emitter.cpp | |
index cf2167b..180aab8 100644 | |
--- a/neo/sound/snd_emitter.cpp | |
+++ b/neo/sound/snd_emitter.cpp | |
@@ -32,6 +32,8 @@ If you have questions concerning this license or the applicable additional terms | |
#include "sound/snd_local.h" | |
+#include <iostream> | |
+ | |
/* | |
=================== | |
idSoundFade::Clear | |
@@ -320,6 +322,7 @@ void idSoundChannel::GatherChannelSamples( int sampleOffset44k, int sampleCount4 | |
} | |
// decode the sample | |
+ std::cerr << " 323 Name:" << loop->name << " soff=" << sampleOffset44k << " len=" << len << "..."; | |
decoder->Decode( loop, sampleOffset44k, len, dest_p ); | |
dest_p += len; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment