New OSS4 output plugin for Audacious

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

New OSS4 output plugin for Audacious

Postby Michal » Mon May 10, 2010 11:18 am

Hello, I've added new OSS4 output plugin for Audacious (http://hg.atheme.org/audacious-plugins/audacious-plugins/rev/fe343b378176) What's new? Gapless playback is now supported. Plugin should be more responsive too. Software buffer isn't implemented (yet?). Anyway internal OSS buffer is used, for 16bit 44,1kHz audio it'll be ~400ms. So it should prevent any pops/clicks. Please test it and let me know what do you think about it.

Bug reports: http://jira.atheme.org - Audacious Plugins project

regards,
Michał
Gentoo ~AMD64 | Audacious
Michal
Member
 
Posts: 16
Joined: Sat Sep 22, 2007 1:29 pm
Location: Lublin, POL

Re: New OSS4 output plugin for Audacious

Postby igorzwx » Tue Mar 19, 2013 12:10 am

Michal wrote:Hello, I've added new OSS4 output plugin for Audacious (http://hg.atheme.org/audacious-plugins/audacious-plugins/rev/fe343b378176) What's new? Gapless playback is now supported. Plugin should be more responsive too. Software buffer isn't implemented (yet?). Anyway internal OSS buffer is used, for 16bit 44,1kHz audio it'll be ~400ms. So it should prevent any pops/clicks. Please test it and let me know what do you think about it.


Your OSS4 plugin for Audacious 3.3.4 has a "secret resampler" inside. Right?

It is named "Enable format conversions made by the OSS software".
It can be enabled/disabled in the Preferences.

This "secret resampler" can perform resampling, e.g 22.05kHz → something else.
It can also convert "mono" to "stereo".

This can be tested with mono waves 16bit 22.05kHz (pcm), if your soundcard does not support "mono" and 22.05kHz sample rate.

For example, Intel HDA codecs do not support "mono" and 22.05kHz with OSS4 [ossinfo -v9].
This means that such a resampler might be a useful thing.

Is it possible to configure your "secret resampler"?
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: New OSS4 output plugin for Audacious

Postby Michal » Tue Mar 19, 2013 11:26 am

Nope. It disables/enables cooked mode: http://manuals.opensound.com/developer/ ... DMODE.html
Gentoo ~AMD64 | Audacious
Michal
Member
 
Posts: 16
Joined: Sat Sep 22, 2007 1:29 pm
Location: Lublin, POL

Re: New OSS4 output plugin for Audacious

Postby igorzwx » Tue Mar 19, 2013 6:55 pm

Michal wrote:Nope. It disables/enables cooked mode: http://manuals.opensound.com/developer/ ... DMODE.html


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 OFF

5. "Enable exclusive mode to prevent virtual mixing" is ON

RESULT 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.
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: New OSS4 output plugin for Audacious

Postby Michal » Wed Mar 20, 2013 12:05 am

Yes, I know what it does... Just disable the damn thing and use whatever resampler/channel mixer you want.

Petrov's plugin has "exclusive mode" which opens device exclusively (omits virtual mixer) and disables cooked mode.
I decided to give more freedom to user, that's why these are separate options. You may want to disable format converter builtin OSS, but still be using virtual mixing. Be aware that if you disable "cooked mode" you need to enable plugins for resampling/channel mixing, otherwise some files won't be played.
Gentoo ~AMD64 | Audacious
Michal
Member
 
Posts: 16
Joined: Sat Sep 22, 2007 1:29 pm
Location: Lublin, POL

Re: New OSS4 output plugin for Audacious

Postby igorzwx » Wed Mar 20, 2013 12:16 am

Michal wrote:Yes, I know what it does... Just disable the damn thing and use whatever resampler/channel mixer you want.

Petrov's plugin has "exclusive mode" which opens device exclusively (omits virtual mixer) and disables cooked mode.
I decided to give more freedom to user, that's why these are separate options. You may want to disable format converter builtin OSS, but still be using virtual mixing. Be aware that if you disable "cooked mode" you need to enable plugins for resampling/channel mixing, otherwise some files won't be played.


Thanks. Would you please consider renaming "Enable format conversions made by the OSS software" into "Enable Fast resampler and lossy format conversions".

The freedom of choice may turn into evil, if one is invited to choose among "deceptive options".
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: New OSS4 output plugin for Audacious

Postby tarik2cyprian » Tue Aug 06, 2013 8:59 am

Does anybody have the Effects plugin for Audicious audio player?
tarik2cyprian
Member
 
Posts: 26
Joined: Thu Jan 24, 2013 7:04 pm

Re: New OSS4 output plugin for Audacious

Postby igorzwx » Tue Aug 06, 2013 11:27 am

tarik2cyprian wrote:Does anybody have the Effects plugin for Audicious audio player?


Do you mean Petrov's effect plugin for Audacious?

You may ask Michał whether he has Petrov's effect plugin for your version of Audacious viewtopic.php?f=3&t=3834#p15221

1. Petrov's effect plugin should be updated for each new version of Audacious.

2. Petrov's OSS4 plugin for DeadBeef player may work for years with different versions of DeadBeef.
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: New OSS4 output plugin for Audacious

Postby tarik2cyprian » Tue Aug 06, 2013 5:38 pm

Yes that is correct the Petrov's effect plugin for Audacious. I am using version 3.3.4 of Audacious.

I click on the link (http://hg.atheme.org/audacious-plugins/ ... 343b378176) but it seems to be down.

I will pm Michael as you sugested.

Thanks Once Again Igorzwz
tarik2cyprian
Member
 
Posts: 26
Joined: Thu Jan 24, 2013 7:04 pm

Re: New OSS4 output plugin for Audacious

Postby tarik2cyprian » Mon May 05, 2014 1:48 am

Hello,

Looking for an updated version of Petrov's effect plugin for Audacious 3.5. The one I am currrently using is not working Audacious 3.5.

Thanks

Tarik
tarik2cyprian
Member
 
Posts: 26
Joined: Thu Jan 24, 2013 7:04 pm


Return to Linux

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest