| @@ -121,7 +121,8 @@ public: | |||||
| /** The current sample rate. | /** The current sample rate. | ||||
| This rate is used for both the input and output devices. | This rate is used for both the input and output devices. | ||||
| A value of 0 indicates the default rate. | |||||
| A value of 0 indicates that you don't care what rate is used, and the | |||||
| device will choose a sensible rate for you. | |||||
| */ | */ | ||||
| double sampleRate; | double sampleRate; | ||||
| @@ -27,7 +27,7 @@ const int kilobytesPerSecond1x = 176; | |||||
| struct AudioTrackProducerClass : public ObjCClass <NSObject> | struct AudioTrackProducerClass : public ObjCClass <NSObject> | ||||
| { | { | ||||
| AudioTrackProducerClass() : ObjCClass ("JUCEAudioTrackProducer_") | |||||
| AudioTrackProducerClass() : ObjCClass <NSObject> ("JUCEAudioTrackProducer_") | |||||
| { | { | ||||
| addIvar<AudioSourceHolder*> ("source"); | addIvar<AudioSourceHolder*> ("source"); | ||||
| @@ -696,7 +696,7 @@ AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, | |||||
| { | { | ||||
| ScopedPointer <AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream)); | ScopedPointer <AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream)); | ||||
| if (w->sampleRate > 0) | |||||
| if (w->sampleRate > 0 && w->numChannels > 0) | |||||
| return w.release(); | return w.release(); | ||||
| if (! deleteStreamIfOpeningFails) | if (! deleteStreamIfOpeningFails) | ||||
| @@ -1016,7 +1016,7 @@ AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, | |||||
| { | { | ||||
| ScopedPointer <WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream)); | ScopedPointer <WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream)); | ||||
| if (r->sampleRate > 0) | |||||
| if (r->sampleRate > 0 && r->numChannels > 0) | |||||
| return r.release(); | return r.release(); | ||||
| if (! deleteStreamIfOpeningFails) | if (! deleteStreamIfOpeningFails) | ||||