Yes, of course. It is rather obvious. However, this sort of answer might be misleading to a certain extent.
A half-truth is a deceptive statement that includes some element of truth. The statement might be partly true, the statement may be totally true but only part of the whole truth, or it may utilize some
deceptive element, such as improper punctuation, or double meaning, especially if the intent is to deceive, evade, blame or misrepresent the truth.
http://en.wikipedia.org/wiki/Half-truth
Michal wrote:Please test it and let me know what do you think about it.
If you really want to know what your plugin is doing with audio files, I may try to explain.
It might be true that the option "Enable format conversions made by the OSS software" enables a kind of "cooked mode", or a sort of "PulseAlsa cookies", but what it actually enables is the "invisible resampler" (a sort of PulseAudio inside OSS4).
This can be easily verified with a very simple and clear-cut test, which can be easily performed by any Ubuntu user.
Sample wave file:- Code: Select all
$ mediainfo mono_16bit_22kHz.wav
General
Complete name : mono_16bit_22kHz.wav
Format : Wave
File size : 109 KiB
Duration : 2s 533ms
Overall bit rate mode : Constant
Overall bit rate : 353 Kbps
Audio
ID : 0
Format : PCM
Format settings, Endianness : Little
Codec ID : 1
Duration : 2s 533ms
Bit rate mode : Constant
Bit rate : 352.8 Kbps
Channel(s) : 1 channel
Sampling rate : 22.05 KHz
Bit depth : 16 bits
Stream size : 109 KiB (100%)
Notice that "mono" format and 22.05 KHz sample rate are not supported by the OSS4 driver (oss_hdaudio) for Intel HDA ALC887 codec
- Code: Select all
$ ossinfo -v9
Audio devices
HD Audio play front /dev/oss/oss_hdaudio0/pcm0 (device index 0)
Legacy device /dev/dsp0
Caps: DUPLEX TRIGGER MMAP
Modes: IN/OUT
Out engine 1: 0/HD Audio play front
Available for use
Engine 2: 9/HD Audio play front (vmix)
Available for use
Engine 3: 10/HD Audio play front (vmix)
Available for use
Engine 4: 11/HD Audio play front (vmix)
Available for use
Engine 5: 12/HD Audio play front (vmix)
Available for use
Input formats (0x00001010):
AFMT_S16_LE - 16 bit signed little endian
AFMT_S32_LE - 32 bit signed little endian
Output formats (0x00001010):
AFMT_S16_LE - 16 bit signed little endian
AFMT_S32_LE - 32 bit signed little endian
Device handle: PCIa0021458-0000:00:1b.0-au01
Related mixer dev: 0
Sample rate source: 0
Preferred channel configuration: Not indicated
Supported number of channels (min - max): 2 - 8
Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
HW Type: Not indicated.
Minimum latency: Not indicated
If you do not believe that "mono" format is not supported, you may try a simple test with a proper mono wave:
- Code: Select all
$ ossplay -R -vvvv mono_16bit_48kHz.wav
FORM len = 235564
mono_16bit_48kHz.wav: Reading chunk fmt , size 16, pos 0, next 12
FMT chunk: len = 16, fmt = 0
mono_16bit_48kHz.wav: Reading chunk data, size 235520, pos 0, next 36
DATA chunk. Offs = 44, len = 235520
Playing WAVE file mono_16bit_48kHz.wav, 16 bits/mono/48000 Hz
/dev/dsp doesn't support 1 channels (2).
$ ossplay -d0 -R -vvvv mono_16bit_48kHz.wav
FORM len = 235564
mono_16bit_48kHz.wav: Reading chunk fmt , size 16, pos 0, next 12
FMT chunk: len = 16, fmt = 0
mono_16bit_48kHz.wav: Reading chunk data, size 235520, pos 0, next 36
DATA chunk. Offs = 44, len = 235520
Playing WAVE file mono_16bit_48kHz.wav, 16 bits/mono/48000 Hz
/dev/oss/oss_hdaudio0/pcm0 doesn't support 1 channels (2).
VMIX is disabled, and all the OSS4 resamplers are also disabled:- Code: Select all
$ ossmix | grep vmix0
vmix0-enable ON|OFF (currently OFF)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|High+|Production|OFF> (currently OFF)
TEST 1: "cooked mode" is disabled.
Audacious/OSS4 settings:
1. All the effect plugins are disabled.
2. "Bit depth" is 32bit
3. "Save volume between sessions" is
OFF (it is a kind of "audio terrorist")
4. [cooked mode] "Enable format conversions made by the OSS software" is
OFF5. "Enable exclusive mode to prevent virtual mixing" is
ONRESULT of the TEST 1: Audacious does not play the sample wave (mono_16bit_22kHz.wav), and reports an error:
"OSS4 error: Selected sample rate is not supported by the device."This does not contradict "ossinfo -v9": 22.05 KHz sample rate is not supported.
TEST 2: Enable "cooked mode", restart Audacios, and the same wave will be played without problem. Because the sample wave (mono_16bit_22kHz.wav) will be resampled (and converted to stereo) with an "unknown resampler" (a kind of PulseAudio inside OSS4).
The problem is that a resampler is really needed in this particular case. But you do not know which sort of OSS4PulseAlsa is actually enabled by the "cooked mode". It might be a buggy "Fast resampler", or crappy "Production quality", or other sort of the crap.
In short, if the option "Enable format conversions made by the OSS software" enables the buggy "Fast resampler" (default) or other sort of the crap, it should be properly renamed. Otherwise, it might be interpreted as a kind of "calculated deception" (gezielte Täuschung).
Moreover, the option "Enable format conversions made by the OSS software" seems to be
useless, although, of course, it may help to
fool naive Ubuntu users. This is, perhaps, the reason why Petrov's plugin for DeadBeef (as well as
ossplay) does not have such
"deceptive options". In fact, "virtual mixing" is less harmful than the "Fast resampler". The user may prefer to use the crappy "Production quality" resampler with VMIX for such purposes.