From a53027eb0510f64eaa518444cdd1088e2378ee68 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Mon, 8 Feb 2010 15:37:38 +0000 Subject: 2.5 Audio: - Using libsamplerate again, doesn't seem to be the bug source. - Changed sequencer audio to work with 2 channels and 44.1 kHz fixed. --- intern/audaspace/intern/AUD_C-API.cpp | 20 +++++++++----------- intern/audaspace/intern/AUD_Mixer.h | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'intern/audaspace') diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp index 2e3ae4ef642..b2d5209e9d6 100644 --- a/intern/audaspace/intern/AUD_C-API.cpp +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -671,17 +671,15 @@ float* AUD_readSoundBuffer(const char* filename, float low, float high, AUD_Sound* AUD_createSequencer(void* data, AUD_volumeFunction volume) { - if(AUD_device) - { - return new AUD_SequencerFactory(AUD_device->getSpecs().specs, data, volume); - } - else - { - AUD_Specs specs; - specs.channels = AUD_CHANNELS_STEREO; - specs.rate = AUD_RATE_44100; - return new AUD_SequencerFactory(specs, data, volume); - } +/* AUD_XXX should be this: but AUD_createSequencer is called before the device + * is initialized. + + return new AUD_SequencerFactory(AUD_device->getSpecs().specs, data, volume); +*/ + AUD_Specs specs; + specs.channels = AUD_CHANNELS_STEREO; + specs.rate = AUD_RATE_44100; + return new AUD_SequencerFactory(specs, data, volume); } void AUD_destroySequencer(AUD_Sound* sequencer) diff --git a/intern/audaspace/intern/AUD_Mixer.h b/intern/audaspace/intern/AUD_Mixer.h index a24422a8a21..2e7ba743541 100644 --- a/intern/audaspace/intern/AUD_Mixer.h +++ b/intern/audaspace/intern/AUD_Mixer.h @@ -26,7 +26,7 @@ #ifndef AUD_MIXER #define AUD_MIXER -#define AUD_MIXER_RESAMPLER AUD_LinearResampleFactory +#define AUD_MIXER_RESAMPLER AUD_SRCResampleFactory #include "AUD_ConverterFunctions.h" class AUD_ConverterFactory; -- cgit v1.2.3