LMMS
Loading...
Searching...
No Matches
AudioFileOgg.h
Go to the documentation of this file.
1/*
2 * AudioFileOgg.h - Audio-device which encodes wave-stream and writes it
3 * into an OGG-file. This is used for song-export.
4 *
5 * Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
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.
13 *
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.
18 *
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.
23 *
24 */
25
26#ifndef LMMS_AUDIO_FILE_OGG_H
27#define LMMS_AUDIO_FILE_OGG_H
28
29#include "lmmsconfig.h"
30
31#ifdef LMMS_HAVE_OGGVORBIS
32
33#include <vorbis/codec.h>
34
35#include "AudioFileDevice.h"
36
37namespace lmms
38{
39
41{
42public:
43 AudioFileOgg( OutputSettings const & outputSettings,
44 const ch_cnt_t _channels,
45 bool & _success_ful,
46 const QString & _file,
48 ~AudioFileOgg() override;
49
50 static AudioFileDevice * getInst( const QString & outputFilename,
51 OutputSettings const & outputSettings,
52 const ch_cnt_t channels,
54 bool & successful )
55 {
56 return new AudioFileOgg( outputSettings, channels, successful, outputFilename, audioEngine );
57 }
58
59private:
60 void writeBuffer(const SampleFrame* _ab, const f_cnt_t _frames) override;
68};
69
70} // namespace lmms
71
72#endif // LMMS_HAVE_OGGVORBIS
73
74#endif // LMMS_AUDIO_FILE_OGG_H
AudioEngine * audioEngine()
Definition AudioDevice.h:121
ch_cnt_t channels() const
Definition AudioDevice.h:106
Definition AudioEngine.h:66
AudioFileDevice(OutputSettings const &outputSettings, const ch_cnt_t _channels, const QString &_file, AudioEngine *audioEngine)
Definition AudioFileDevice.cpp:35
void writeBuffer(const SampleFrame *_ab, const f_cnt_t _frames) override
Definition AudioFileOgg.cpp:92
~AudioFileOgg() override
Definition AudioFileOgg.cpp:80
AudioFileOgg(OutputSettings const &outputSettings, const ch_cnt_t _channels, bool &_success_ful, const QString &_file, AudioEngine *audioEngine)
Definition AudioFileOgg.cpp:41
vorbis_info m_vi
Definition AudioFileOgg.h:61
vorbis_comment m_vc
Definition AudioFileOgg.h:63
vorbis_dsp_state m_vds
Definition AudioFileOgg.h:62
static AudioFileDevice * getInst(const QString &outputFilename, OutputSettings const &outputSettings, const ch_cnt_t channels, AudioEngine *audioEngine, bool &successful)
Definition AudioFileOgg.h:50
ogg_packet m_packet
Definition AudioFileOgg.h:66
ogg_page m_page
Definition AudioFileOgg.h:67
vorbis_block m_vb
Definition AudioFileOgg.h:64
ogg_stream_state m_oss
Definition AudioFileOgg.h:65
Definition OutputSettings.h:36
Definition SampleFrame.h:41
Definition AudioAlsa.cpp:35
std::uint16_t ch_cnt_t
Definition LmmsTypes.h:44
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43
Definition ogg.h:89
Definition ogg.h:42
Definition ogg.h:52
Definition codec.h:87
Definition codec.h:139
Definition codec.h:58
Definition codec.h:27