From 4f8d094eeedb01dbfda13777ef90f63f1b50e410 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 22 Feb 2013 14:51:52 +0000 Subject: [PATCH] Added some extra sample rates to some of the AudioFormat classes. --- .../juce_audio_devices/native/juce_mac_CoreMidi.cpp | 1 - .../codecs/juce_FlacAudioFormat.cpp | 11 +++++++---- .../codecs/juce_OggVorbisAudioFormat.cpp | 11 +++++++---- .../juce_audio_formats/codecs/juce_WavAudioFormat.cpp | 11 +++++++---- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp index 7987a91659..8d966ce003 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp @@ -23,7 +23,6 @@ ============================================================================== */ - #ifndef JUCE_LOG_COREMIDI_ERRORS #define JUCE_LOG_COREMIDI_ERRORS 1 #endif diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 38221311a5..f60bc0cdd2 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -492,14 +492,17 @@ FlacAudioFormat::~FlacAudioFormat() Array FlacAudioFormat::getPossibleSampleRates() { - const int rates[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000, 0 }; - return Array (rates); + const int rates[] = { 8000, 11025, 12000, 16000, 22050, 32000, 44100, 48000, + 88200, 96000, 176400, 192000, 352800, 384000 }; + + return Array (rates, numElementsInArray (rates)); } Array FlacAudioFormat::getPossibleBitDepths() { - const int depths[] = { 16, 24, 0 }; - return Array (depths); + const int depths[] = { 16, 24 }; + + return Array (depths, numElementsInArray (depths)); } bool FlacAudioFormat::canDoStereo() { return true; } diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index 5685d51002..d725420006 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -437,14 +437,17 @@ OggVorbisAudioFormat::~OggVorbisAudioFormat() Array OggVorbisAudioFormat::getPossibleSampleRates() { - const int rates[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 0 }; - return Array (rates); + const int rates[] = { 8000, 11025, 12000, 16000, 22050, 32000, + 44100, 48000, 88200, 96000, 176400, 192000 }; + + return Array (rates, numElementsInArray (rates)); } Array OggVorbisAudioFormat::getPossibleBitDepths() { - const int depths[] = { 32, 0 }; - return Array (depths); + const int depths[] = { 32 }; + + return Array (depths, numElementsInArray (depths)); } bool OggVorbisAudioFormat::canDoStereo() { return true; } diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 5232d48aba..45aa83da17 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -1086,14 +1086,17 @@ WavAudioFormat::~WavAudioFormat() Array WavAudioFormat::getPossibleSampleRates() { - const int rates[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 0 }; - return Array (rates); + const int rates[] = { 8000, 11025, 12000, 16000, 22050, 32000, + 44100, 48000, 88200, 96000, 176400, 192000 }; + + return Array (rates, numElementsInArray (rates)); } Array WavAudioFormat::getPossibleBitDepths() { - const int depths[] = { 8, 16, 24, 32, 0 }; - return Array (depths); + const int depths[] = { 8, 16, 24, 32 }; + + return Array (depths, numElementsInArray (depths)); } bool WavAudioFormat::canDoStereo() { return true; }