2 * AudioFileWave.h - AudioBackend which encodes wave-stream and writes it
3 * into a WAVE-file. This is used for song-export.
5 * Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
7 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
26 #ifndef _AUDIO_FILE_WAVE_H
27 #define _AUDIO_FILE_WAVE_H
29 #include "lmmsconfig.h"
30 #include "AudioFileDevice.h"
35 class AudioFileWave
: public AudioFileDevice
38 AudioFileWave( const sample_rate_t _sample_rate
,
39 const ch_cnt_t _channels
,
41 const QString
& _file
,
43 const bitrate_t _nom_bitrate
,
44 const bitrate_t _min_bitrate
,
45 const bitrate_t _max_bitrate
,
47 AudioOutputContext
* context
);
48 virtual ~AudioFileWave();
50 static AudioFileDevice
* getInst( const sample_rate_t _sample_rate
,
51 const ch_cnt_t _channels
,
53 const QString
& _file
,
55 const bitrate_t _nom_bitrate
,
56 const bitrate_t _min_bitrate
,
57 const bitrate_t _max_bitrate
,
59 AudioOutputContext
* context
)
61 return new AudioFileWave( _sample_rate
, _channels
,
62 _success_ful
, _file
, _use_vbr
,
63 _nom_bitrate
, _min_bitrate
,
64 _max_bitrate
, _depth
, context
);
69 virtual void writeBuffer( const surroundSampleFrame
* _ab
,
74 void finishEncoding();