Formatting.
svn-id: r47540
This commit is contained in:
parent
8c28155848
commit
ec14cd6e6a
1 changed files with 10 additions and 14 deletions
|
@ -41,8 +41,8 @@ namespace Audio {
|
||||||
|
|
||||||
struct StreamFileFormat {
|
struct StreamFileFormat {
|
||||||
/** Decodername */
|
/** Decodername */
|
||||||
const char* decoderName;
|
const char *decoderName;
|
||||||
const char* fileExtension;
|
const char *fileExtension;
|
||||||
/**
|
/**
|
||||||
* Pointer to a function which tries to open a file of type StreamFormat.
|
* Pointer to a function which tries to open a file of type StreamFormat.
|
||||||
* Return NULL in case of an error (invalid/nonexisting file).
|
* Return NULL in case of an error (invalid/nonexisting file).
|
||||||
|
@ -51,16 +51,16 @@ struct StreamFileFormat {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const StreamFileFormat STREAM_FILEFORMATS[] = {
|
static const StreamFileFormat STREAM_FILEFORMATS[] = {
|
||||||
/* decoderName, fileExt, openStreamFuntion */
|
/* decoderName, fileExt, openStreamFuntion */
|
||||||
#ifdef USE_FLAC
|
#ifdef USE_FLAC
|
||||||
{ "Flac", ".flac", makeFlacStream },
|
{ "Flac", ".flac", makeFlacStream },
|
||||||
{ "Flac", ".fla", makeFlacStream },
|
{ "Flac", ".fla", makeFlacStream },
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_VORBIS
|
#ifdef USE_VORBIS
|
||||||
{ "Ogg Vorbis", ".ogg", makeVorbisStream },
|
{ "Ogg Vorbis", ".ogg", makeVorbisStream },
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_MAD
|
#ifdef USE_MAD
|
||||||
{ "MPEG Layer 3", ".mp3", makeMP3Stream },
|
{ "MPEG Layer 3", ".mp3", makeMP3Stream },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{ NULL, NULL, NULL } // Terminator
|
{ NULL, NULL, NULL } // Terminator
|
||||||
|
@ -271,8 +271,8 @@ private:
|
||||||
AudioStream *_stream;
|
AudioStream *_stream;
|
||||||
DisposeAfterUse::Flag _disposeAfterUse;
|
DisposeAfterUse::Flag _disposeAfterUse;
|
||||||
StreamHolder(AudioStream *stream, DisposeAfterUse::Flag disposeAfterUse)
|
StreamHolder(AudioStream *stream, DisposeAfterUse::Flag disposeAfterUse)
|
||||||
: _stream(stream),
|
: _stream(stream),
|
||||||
_disposeAfterUse(disposeAfterUse) {}
|
_disposeAfterUse(disposeAfterUse) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -303,7 +303,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QueuingAudioStreamImpl(int rate, bool stereo)
|
QueuingAudioStreamImpl(int rate, bool stereo)
|
||||||
: _rate(rate), _stereo(stereo), _finished(false) {}
|
: _rate(rate), _stereo(stereo), _finished(false) {}
|
||||||
~QueuingAudioStreamImpl();
|
~QueuingAudioStreamImpl();
|
||||||
|
|
||||||
// Implement the AudioStream API
|
// Implement the AudioStream API
|
||||||
|
@ -360,12 +360,8 @@ int QueuingAudioStreamImpl::readBuffer(int16 *buffer, const int numSamples) {
|
||||||
return samplesDecoded;
|
return samplesDecoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QueuingAudioStream *makeQueuingAudioStream(int rate, bool stereo) {
|
QueuingAudioStream *makeQueuingAudioStream(int rate, bool stereo) {
|
||||||
return new QueuingAudioStreamImpl(rate, stereo);
|
return new QueuingAudioStreamImpl(rate, stereo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // End of namespace Audio
|
} // End of namespace Audio
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue