diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-10-06 08:29:30 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-10-06 08:29:30 +0000 |
| commit | 7ba68e0e000920e406fa78146c660dc28dd4c120 (patch) | |
| tree | aab32b01f1da4419322677efde533bf2fa31a1eb /src | |
| parent | f3462df1e8eb8cc636112a5c8d61a397b61024c0 (diff) | |
| download | qmmp-7ba68e0e000920e406fa78146c660dc28dd4c120.tar.gz qmmp-7ba68e0e000920e406fa78146c660dc28dd4c120.tar.bz2 qmmp-7ba68e0e000920e406fa78146c660dc28dd4c120.zip | |
ported null plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4535 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/Output/Output.pro | 2 | ||||
| -rw-r--r-- | src/plugins/Output/null/outputnull.cpp | 12 | ||||
| -rw-r--r-- | src/plugins/Output/null/outputnull.h | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/Output/Output.pro b/src/plugins/Output/Output.pro index 7dc1f0ddb..1de928c36 100644 --- a/src/plugins/Output/Output.pro +++ b/src/plugins/Output/Output.pro @@ -4,7 +4,7 @@ TEMPLATE = subdirs win32:SUBDIRS += waveout win32:SUBDIRS += directsound -#SUBDIRS += null +SUBDIRS += null unix{ diff --git a/src/plugins/Output/null/outputnull.cpp b/src/plugins/Output/null/outputnull.cpp index 92ee134e5..ce71f4ec0 100644 --- a/src/plugins/Output/null/outputnull.cpp +++ b/src/plugins/Output/null/outputnull.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2012 by Ilya Kotov * + * Copyright (C) 2010-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -30,22 +30,22 @@ OutputNull::OutputNull() : Output() OutputNull::~OutputNull() {} -bool OutputNull::initialize(quint32 freq, int chan, Qmmp::AudioFormat format) +bool OutputNull::initialize(quint32 freq, ChannelMap map, Qmmp::AudioFormat format) { switch (format) { case Qmmp::PCM_S8: - m_bytes_per_second = freq * chan; + m_bytes_per_second = freq * map.count(); break; case Qmmp::PCM_S24LE: case Qmmp::PCM_S32LE: - m_bytes_per_second = freq * chan * 4; + m_bytes_per_second = freq * map.count() * 4; break; case Qmmp::PCM_S16LE: default: - m_bytes_per_second = freq * chan * 2; + m_bytes_per_second = freq * map.count() * 2; } - configure(freq, chan, format); + configure(freq, map, format); return true; } diff --git a/src/plugins/Output/null/outputnull.h b/src/plugins/Output/null/outputnull.h index 06fb05158..54c30572a 100644 --- a/src/plugins/Output/null/outputnull.h +++ b/src/plugins/Output/null/outputnull.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2012 by Ilya Kotov * + * Copyright (C) 2010-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -32,7 +32,7 @@ public: OutputNull(); ~OutputNull(); - bool initialize(quint32, int, Qmmp::AudioFormat format); + bool initialize(quint32, ChannelMap map, Qmmp::AudioFormat format); //output api qint64 latency(); qint64 writeAudio(unsigned char *data, qint64 maxSize); |
