00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GLUON_AUDIO_SOUNDREADER_H
00021 #define GLUON_AUDIO_SOUNDREADER_H
00022
00023 #include "gluon_audio_export.h"
00024
00025 #include <QtCore/QString>
00026 #include <QtCore/QStringList>
00027 #include <al.h>
00028
00029 namespace GluonAudio
00030 {
00031 class Buffer;
00032
00033 class GLUON_AUDIO_EXPORT SoundReader
00034 {
00035 public:
00036 SoundReader( const QString& fileName );
00037 ~SoundReader();
00038
00039 QString format() const;
00040 bool canRead() const;
00041 static QStringList supportedSoundFormats() ;
00042 QString fileName() const;
00043 ALuint alBuffer();
00044 Buffer* buffer();
00045
00046 protected:
00047 ALuint fromWav();
00048 ALuint fromOgg();
00049
00050 private:
00051 Q_DISABLE_COPY( SoundReader )
00052
00053 class SoundReaderPrivate;
00054 SoundReaderPrivate* const d;
00055
00056 };
00057 }
00058
00059 #endif // GLUON_AUDIO_SOUNDREADER_H