Bit-Perfect Audio Playback

OSS specific Linux discussion (x86/amd64)

Moderators: dev, hannu, cesium

igorzwx
Known Member
Posts: 1262
Joined: Sun Jun 28, 2009 9:31 pm

Re: Bit-Perfect Audio Playback

Postby igorzwx » Wed May 21, 2014 1:22 pm

shoober420 wrote:show me some evidence of its existence.


You are right, everything should be verified. If you pretend to be a "true audiophile", you have to prove to yourself that Deadbeef does not have any secret resamplers, converters, and anything else which may reduce sound quality. You have to study the source code of Deadbeef.

shoober420 wrote:cooked mode can be disabled with the osscore.conf file.


You may try to disable "cooked mode" and vmix in /usr/lib/oss/conf/osscore.conf
and reboot (or reload OSS).
Then you may want to verify whether they are really disabled or not.

Finally, you may try to play a HiRes FLAC with Deadbeef. If you hear that it is "bit-perfect", you may believe that it is.

In short, a true audiophile can believe his ears, a "semi-deaf audiophile" have to study the source code.

Since a "semi-deaf audiophile" cannot hear the difference, he may try to disable all resamplers and format converters in an effort to improve sound quality. It does make sense, because resamplers and format converters cannot be lossless. Moreover, they can be buggy. It is perfectly reasonable to disable everything which may reduce sound quality.

shoober420 wrote:where can I find Petrov's plugin?


Petrov's plugin for Deadbeef can be downloaded here: _http://www.opensound.com/forum/viewtopic.php?f=3&t=3543&start=90#p19477
The manual is included in tar.gz
The sceenshots are here: _http://www.opensound.com/forum/viewtopic.php?f=3&t=3543&start=90#p19207

Please read the manual instead of asking questions how to configure Petrov's plugin.

shoober420
Member
Posts: 40
Joined: Mon Apr 28, 2014 7:09 am

Re: Bit-Perfect Audio Playback

Postby shoober420 » Thu May 22, 2014 4:23 am

igorzwx wrote:You have to study the source code of Deadbeef.


So are you saying that you know for a fact Deadbeef does have a secret resampler because you studied the source code? What if I e-mailed the coder of Deadbeef and asked him the same question? Do you think he would have the same answer you do? Deadbeef does have resamplers included in the form of DSP's, that can easily be disabled (and even deleted). Are there any audio players that don't have any secret resamplers?

igorzwx wrote:You may try to disable "cooked mode" and vmix in /usr/lib/oss/conf/osscore.conf
and reboot (or reload OSS).
Then you may want to verify whether they are really disabled or not.


Upon doing so, I did notice music sounded a lot cleaner, and more defined, if you know what I mean. It definitely sounded better once I disabled the cooked mode.

igorzwx wrote:Since a "semi-deaf audiophile" cannot hear the difference, he may try to disable all resamplers and format converters in an effort to improve sound quality. It does make sense, because resamplers and format converters cannot be lossless. Moreover, they can be buggy. It is perfectly reasonable to disable everything which may reduce sound quality.


I would say all audiophiles disable resamplers and converters, no matter how you label and categorize them. If you strive for bit-perfect audio playback, they indeed must be disabled. I'm very bias against audio plugins. I don't want anything to interfere with the sound. There's a lot of plugins out there that claim to improve sound quality, but do the opposite. Since Petrov's plugin is just another resampler, I won't touch it. I don't want anything to change and resample the music.

Also, calling cooked mode a "secret" resampler is a little over board. Its not what I would consider secret. You can easily disable it in the osscore.conf file. If you had no option to disable it, and it not even being mentioned in a .conf file, then I could see someone calling it "secret".
Debian Sid
Intel Core2Duo E8400 @3.9GHz
ASUS Xonar Essence STX
nVidia GeForce 760 GTX
4GBs DDR2@ 863MHz
Sennheiser HD595

www.last.fm/user/shoober

igorzwx
Known Member
Posts: 1262
Joined: Sun Jun 28, 2009 9:31 pm

Re: Bit-Perfect Audio Playback

Postby igorzwx » Thu May 22, 2014 2:54 pm

shoober420 wrote:calling cooked mode a "secret" resampler is a little over board. Its not what I would consider secret. You can easily disable it in the osscore.conf file. If you had no option to disable it, and it not even being mentioned in a .conf file, then I could see someone calling it "secret".


You are right. The "cooked mode" is not a secret for you, because you believe that you know how to disable it.

If you want to learn other "secrets" without studying documentation and the source code, you may try to be very polite. It might be much more effective than a sort of "interrogation" which you seem to practice.

I did try to explain you something, but it seems that you cannot understand my explanations, or, perhaps, you misinterpret them deliberately. It might be a coincidence, but certain interrogation methods (practiced by the Russian KGB) did include "misinterpretation of answers" and "repetition of the same questions".

In any case, if you are already content with your "bit-perfect" playback, this topic might be closed.

igorzwx
Known Member
Posts: 1262
Joined: Sun Jun 28, 2009 9:31 pm

Re: Bit-Perfect Audio Playback

Postby igorzwx » Thu May 22, 2014 4:58 pm

igorzwx wrote:If I am not mistaken, the "open source" version of Deadbeef also performs a kind of lossy format conversions.


As a rule "open source" players have a kind of secret resampler/converter inside, or they secretly enable the "cooked mode". Deadbeef player does have this sort of secret crap inside. This can be easily proved by a very simple test.
It is not a kind of "secret test". It was already explained many times on this forum.

In a word, mplayer2 also has this sort of "secret crap" inside.

The purpose of this "secret crap" is to improve "user experience". This was clearly stated in the OSS4 documentation:

The audio device being used doesn't necessarily support the sample format, sampling rate or number of channels that the application needs. In such cases OSS automatically converts between the format used by the application and the one supported by the device. Normally this is desired behaviour. _http://manuals.opensound.com/developer/SNDCTL_DSP_COOKEDMODE.html


Since the default resampler of OSS4 is the so-called "Fast resampler", this statement seems to mean that audiophiles are not desirable users of OSS4. The desirable ones seem to be those who are deaf or semi-deaf.

shoober420
Member
Posts: 40
Joined: Mon Apr 28, 2014 7:09 am

Re: Bit-Perfect Audio Playback

Postby shoober420 » Thu May 22, 2014 11:35 pm

igorzwx wrote:[
If you want to learn other "secrets" without studying documentation and the source code, you may try to be very polite. It might be much more effective than a sort of "interrogation" which you seem to practice.

I did try to explain you something, but it seems that you cannot understand my explanations, or, perhaps, you misinterpret them deliberately. It might be a coincidence, but certain interrogation methods (practiced by the Russian KGB) did include "misinterpretation of answers" and "repetition of the same questions".


How am I not being polite? I was just saying that calling cooking mode a secret is a little over exaggerating. The OSS4 coders are not hiding this feature from us. I also was just stating how I simply don't agree with some of the things you say, in regards of how you label and catagorize audiophiles. I wasn't being disrespectful in anyway. If anyone here is being disrespectful, its you by calling people "semi-deaf".

I keep asking the same questions because your not answering what I ask. I have asked numerous times which audio player doesn't do secret resampling, and you haven't responded. So it may seem like interrogation, because you are simply not answering my questions. So I have to ask them again, in the hopes that you will actually answer them. You have said which players have the secret resampling, but have no yet said which ones don't have it. That's why I keep asking you. I'm sorry if I came off as mean, I'm just trying to figure out which audio players do not do this secret resampling, or re-enable cooked mode.
Debian Sid
Intel Core2Duo E8400 @3.9GHz
ASUS Xonar Essence STX
nVidia GeForce 760 GTX
4GBs DDR2@ 863MHz
Sennheiser HD595

www.last.fm/user/shoober

igorzwx
Known Member
Posts: 1262
Joined: Sun Jun 28, 2009 9:31 pm

Re: Bit-Perfect Audio Playback

Postby igorzwx » Fri May 23, 2014 12:16 am

shoober420 wrote:You have said which players have the secret resampling, but have no yet said which ones don't have it.


Perhaps, ossplay does not have secret resamplers, or converters.
This can be easily verified with that same very simple test which was many times explained on this forum.

It should not be difficult to reinvent this simple test, because it is really obvious.
If you fail to reinvent this test, it may help to diagnose the problem of "persistent misunderstanding".

In a word, ossplay has an option -R which seems to be equivalent to the "exclusive mode" of Petrov's plugin.
Last edited by igorzwx on Fri May 23, 2014 2:41 am, edited 1 time in total.

shoober420
Member
Posts: 40
Joined: Mon Apr 28, 2014 7:09 am

Re: Bit-Perfect Audio Playback

Postby shoober420 » Fri May 23, 2014 1:05 am

I think I found a way to see if Deadbeef is enabling cooked mode. It was by accident. I don't know if this is a bug in Deadbeef, but I loaded a 24bit/96khz vinyl rip in Deadbeef, and it played fine. Then, I went to a normal redbook rip which is 16bit/44khz, and the audio was playing abnormaly fast. If you playback a 44khz file at 96khz, it will play back a lot faster. So I for sure think cooked mode is disabled and is not re-converting any audio. But, I guess that still means it could be resampling audio.

From what I read from the osscore.conf about cooked mode, it simply will convert the audio if the sound card doesn't support the frequency. For example, my sound card can go as low as 32khz. I tried to play a game with cooked mode disabled that was 22khz, and I had no sound. I then enabled cooked mode and I then had sound. So cooked mode converted that audio to a freqency my sound card supports. I'm not sure if cooked mode actually does anything if OSS4 receives a freqency that your sound card supports. I think cooked mode will only do something if its triggered by the program, or receives a freqency your sound card doesn't support.

I would like to try out ossplay, but it seems it doesn't support FLAC. I might convert them to WAVs in the future just to try this and see if there's a difference in sound quality compared to ossplay and Deadbeef. Then I will know if resampling is taking place. I tried to search the forum for "Deadbeef test" and didn't find anything in regards to the test you're talking about. Could you just link me to the thread that talks about it?
Debian Sid
Intel Core2Duo E8400 @3.9GHz
ASUS Xonar Essence STX
nVidia GeForce 760 GTX
4GBs DDR2@ 863MHz
Sennheiser HD595

www.last.fm/user/shoober

nuc
Moderator
Posts: 111
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: Khadas Tone Board
OS: ArchLinux
Contact:

Re: Bit-Perfect Audio Playback

Postby nuc » Fri May 23, 2014 1:50 am

shoober420 wrote:I think I found a way to see if Deadbeef is enabling cooked mode. It was by accident. I don't know if this is a bug in Deadbeef, but I loaded a 24bit/96khz vinyl rip in Deadbeef, and it played fine. Then, I went to a normal redbook rip which is 16bit/44khz, and the audio was playing abnormaly fast. If you playback a 44khz file at 96khz, it will play back a lot faster. So I for sure think cooked mode is disabled and is not re-converting any audio. But, I guess that still means it could be resampling audio.

That's pretty interesting since I've experienced this very same issue in Audacious...
nuc wrote:EDIT2: I noticed that when I uncheck "Enable format conversions by OSS" there is a bug that plays tracks to fast. But this might also be a result of my codec being unsupported...
nuc wrote:Also I have found out that the bug only occurs when the vmix setting is on "High" or "OFF", but not when it's on "Fast". Any explanation for this?


...please read viewtopic.php?f=3&t=5690#p20629 and viewtopic.php?f=3&t=5690#p20631.
I had seen this for a proof of being able to successfully disable VMIX by simply unchecking it in ossxmix (without the need of disabling in in the .conf file).
https://github.com/Nuc1eoN/4Front-Tech-Website

igorzwx
Known Member
Posts: 1262
Joined: Sun Jun 28, 2009 9:31 pm

Re: Bit-Perfect Audio Playback

Postby igorzwx » Fri May 23, 2014 2:29 am

shoober420 wrote:I would like to try out ossplay, but it seems it doesn't support FLAC. I might convert them to WAVs in the future just to try this and see if there's a difference in sound quality compared to ossplay and Deadbeef. Then I will know if resampling is taking place. I tried to search the forum for "Deadbeef test" and didn't find anything in regards to the test you're talking about. Could you just link me to the thread that talks about it?


It is not difficult to convert flac into wave.

Code: Select all

$ sudo apt-get install flac


Code: Select all

$ flac -d mumu.flac


To see which formats are supported for your soundcard, you run

Code: Select all

$ ossinfo -v9


If your soundcard does not play mono (e.g. Intel HDA codecs), you may try mono.wav with ossplay:

Code: Select all

$ ossplay -vvvv mono.wav


If your soundcard does not support 8bit or 32bit, you may try them too.
You may also try different sample rates, and so on.

If you do not know how to create test audio files of different formats and sample rates, you may ask for help on Audacity forum.

Code: Select all

$ apt-cache search mediainfo
mediainfo - command-line utility for reading information from audio/video files


Code: Select all

$ man ossplay
       -R     Disable  redirection  to  virtual  mixer  engines   and   sample
              rate/format  conversions.  Should  not be used unless absolutely
              necessary.

shoober420
Member
Posts: 40
Joined: Mon Apr 28, 2014 7:09 am

Re: Bit-Perfect Audio Playback

Postby shoober420 » Fri May 23, 2014 2:52 am

nuc wrote:That's pretty interesting since I've experienced this very same issue in Audacious...


I think this happens when the player gets stuck using the last freqency it used. When I closed out of Deadbeef and re loaded it, the audio was fixed. If cooked mode was enabled, I wouldn't of experienced this, since it would keep the freqency the same. So Deadbeef and Audacious must truly disable cooked mode for sure.

igorzwx wrote:It is not difficult to convert flac into wave.


I just converted some FLAC's into WAVs using Deadbeef, and played them back with ossplay with the -R command line parameter. I couldn't really tell a difference. Maybe ossplay was a little better. But, just in case, since ossplay is very minimal, I doubt it contains any resamplers or converters except those included with oss4 (which are easy to disable). Because of this, I will use ossplay as my default player, since you insist that Deadbeef does make use of that command that secretly enables cooked mode.
Debian Sid
Intel Core2Duo E8400 @3.9GHz
ASUS Xonar Essence STX
nVidia GeForce 760 GTX
4GBs DDR2@ 863MHz
Sennheiser HD595

www.last.fm/user/shoober

nuc
Moderator
Posts: 111
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: Khadas Tone Board
OS: ArchLinux
Contact:

Re: Bit-Perfect Audio Playback

Postby nuc » Fri May 23, 2014 3:12 am

shoober420 wrote: Because of this, I will use ossplay as my default player, since you insist that Deadbeef does make use of that command that secretly enables cooked mode.

Actually you could just make life easier and use Deadbeef with Petrov's plugin using "exclusive mode" or use Audacious with "exclusive mode". It will also omit all resamplers so that you don't need to rely on "ossplay -R". "Exclusive mode" is comparable to the "-R" option.
https://github.com/Nuc1eoN/4Front-Tech-Website

shoober420
Member
Posts: 40
Joined: Mon Apr 28, 2014 7:09 am

Re: Bit-Perfect Audio Playback

Postby shoober420 » Fri May 23, 2014 11:21 am

I thought about using Petrov's plugin, but I just refuse to use plugins of any kind. I remember you mentioning that Deadbeef had more latency then Audacious. Well, I can imagine that ossplay having the least of them both, and out of all audio players. OSSPlay is like built into OSS4, it seems so perfect to use it if you want a no thrills audio player with no plugins, DSPs, resamplers, or any of that stuff. Its just RAW playback. I can't understand source code, but I can imagine that OSSPlay has no resamplers or converters, unless you decide to use the ones that are apart of OSS4. I'm seriously considering learning to program so I can make GUI for this audio player. Maybe give it some needed features like FLAC, WAVPack, and APE playback. Then it would be the perfect audiophile player.
Debian Sid
Intel Core2Duo E8400 @3.9GHz
ASUS Xonar Essence STX
nVidia GeForce 760 GTX
4GBs DDR2@ 863MHz
Sennheiser HD595

www.last.fm/user/shoober

nuc
Moderator
Posts: 111
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: Khadas Tone Board
OS: ArchLinux
Contact:

Re: Bit-Perfect Audio Playback

Postby nuc » Fri May 23, 2014 12:06 pm

Of course, everybody can use the program he is comfortable with.

shoober420 wrote:I remember you mentioning that Deadbeef had more latency then Audacious.

This might only be my local problem, you still didn't answer my question if it also happens for you...
Again: I didn't use any program to measure this... Just press play or pause or whatever and see if it produces a noticable latency...

Thanks.
https://github.com/Nuc1eoN/4Front-Tech-Website

shoober420
Member
Posts: 40
Joined: Mon Apr 28, 2014 7:09 am

Re: Bit-Perfect Audio Playback

Postby shoober420 » Fri May 23, 2014 12:24 pm

I never downloaded Audacious, so I can't compare them both. But, I did just open Deadbeef and test the pause and play you were talking about. When I click pause, there is a slight pause before it stops the music. Then, when I hit play, it instantly plays. Its just when pausing it, there will be a slight pause before it actually stops it. I have made up my mind though and I'm sticking with OSSPlay. It seems to be just what I'm looking for. I'm sure using OSSPlay with the -R command line parameter, I will have bit-perfect playback.
Debian Sid
Intel Core2Duo E8400 @3.9GHz
ASUS Xonar Essence STX
nVidia GeForce 760 GTX
4GBs DDR2@ 863MHz
Sennheiser HD595

www.last.fm/user/shoober

nuc
Moderator
Posts: 111
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: Khadas Tone Board
OS: ArchLinux
Contact:

Re: Bit-Perfect Audio Playback

Postby nuc » Fri May 23, 2014 12:45 pm

Thanks for the results it's the same for me.

Btw even if you decided to use ossplay you should consider to download and try audacious, it's just a matter of "apt-get install audacious audacious-plugins".
I'm not saying that you should use Audacious instead of ossplay, but one should always try all possibilities of a solution before judging what is best for you. Only by comparing face to face one can judge if something is superior or not. And it's never bad to have some extra knowledge ;)
https://github.com/Nuc1eoN/4Front-Tech-Website


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 6 guests