1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a GCC OSX compile bug. Tidied up some comments. Added more checking when opening a wav or aiff file.

This commit is contained in:
jules 2012-06-13 20:11:09 +01:00
parent 5aa9d93c9a
commit 51002a72db
4 changed files with 5 additions and 4 deletions

View file

@ -121,7 +121,8 @@ public:
/** The current sample rate.
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;

View file

@ -27,7 +27,7 @@ const int kilobytesPerSecond1x = 176;
struct AudioTrackProducerClass : public ObjCClass <NSObject>
{
AudioTrackProducerClass() : ObjCClass ("JUCEAudioTrackProducer_")
AudioTrackProducerClass() : ObjCClass <NSObject> ("JUCEAudioTrackProducer_")
{
addIvar<AudioSourceHolder*> ("source");

View file

@ -696,7 +696,7 @@ AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream,
{
ScopedPointer <AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));
if (w->sampleRate > 0)
if (w->sampleRate > 0 && w->numChannels > 0)
return w.release();
if (! deleteStreamIfOpeningFails)

View file

@ -1016,7 +1016,7 @@ AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream,
{
ScopedPointer <WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));
if (r->sampleRate > 0)
if (r->sampleRate > 0 && r->numChannels > 0)
return r.release();
if (! deleteStreamIfOpeningFails)