![]() |
Mixxx
|
00001 /*************************************************************************** 00002 soundsourcesndfile.h - description 00003 ------------------- 00004 copyright : (C) 2002 by Tue and Ken Haste Andersen 00005 email : 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef SOUNDSOURCESNDFILE_H 00018 #define SOUNDSOURCESNDFILE_H 00019 00020 #include "soundsource.h" 00021 #include <stdio.h> 00022 #include <sndfile.h> 00023 00024 class SoundSourceSndFile : public Mixxx::SoundSource 00025 { 00026 public: 00027 SoundSourceSndFile(QString qFilename); 00028 ~SoundSourceSndFile(); 00029 int open(); 00030 long seek(long); 00031 unsigned read(unsigned long size, const SAMPLE*); 00032 inline long unsigned length(); 00033 int parseHeader(); 00034 static QList<QString> supportedFileExtensions(); 00035 00036 private: 00037 bool m_bOpened; 00038 int channels; 00039 SNDFILE *fh; 00040 SF_INFO *info; 00041 unsigned long filelength; 00042 }; 00043 00044 #endif