more than 16 bit audio

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
shgd
Newbie
Newbie
Posts: 1
Joined: Sun Mar 13, 2011 1:44 am

more than 16 bit audio

Post by shgd »

hello,

can I get out of wine more than 16 bit output?
sound_file -> player -> wine_out, which is 24/32 to linux?

somethink like that, I am audiophile :(

thank you
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: more than 16 bit audio

Post by vitamin »

shgd wrote:can I get out of wine more than 16 bit output?
Yes, Wine's dsound supports 32-bit IEEE float buffer format.
Trevor Bowen

more than 16 bit audio

Post by Trevor Bowen »

Should that appear in the "Audio" tab on the winecfg form? (I only see
8-bit and 16-bit options in winecfg.) If not, how is 32-bit set?

Is 96kHz sample rate available too? I only see up to 48kHz in the winecfg form.

Thanks! (I'm trying to get the most out of my Echo Audio Mia card in wine,
which is a 24-bit/96kHz card.

Thanks!

Trevor

On 03/13/2011 11:37 AM, vitamin wrote:
shgd wrote:
can I get out of wine more than 16 bit output?
Yes, Wine's dsound supports 32-bit IEEE float buffer format.



vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: more than 16 bit audio

Post by vitamin »

Trevor Bowen wrote:Should that appear in the "Audio" tab on the winecfg form?
Probably should, but that's up to program that talks to dsound to ask for specific format.

Looks those settings for software HW acceleration when Wine remixes sound. Also you can try changing those settings via registry.
Trevor Bowen

more than 16 bit audio

Post by Trevor Bowen »

Thanks! Where would those registry settings be stored in the tree?

On 03/13/2011 05:48 PM, vitamin wrote:
Trevor Bowen wrote:
Should that appear in the "Audio" tab on the winecfg form?
Probably should, but that's up to program that talks to dsound to ask for specific format.

Looks those settings for software HW acceleration when Wine remixes sound. Also you can try changing those settings via registry.



vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: more than 16 bit audio

Post by vitamin »

Trevor Bowen wrote:Thanks! Where would those registry settings be stored in the tree?
http://wiki.winehq.org/UsefulRegistryKeys
Trevor Bowen

more than 16 bit audio

Post by Trevor Bowen »

An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Trevor Bowen

more than 16 bit audio

Post by Trevor Bowen »

(plain-text version this time... :)

Thanks, vitamin!

Using "wine regedit", I was able to add the following registry keys to
enable 32-bit, 96 kHz audio capture and playback (~/.wine/user.reg):

[Software\\Wine\\Alsa Driver] 1300973815
"AutoScanCards"="no"
"AutoScanDevices"="yes"
"DeviceCount"="1"
"DeviceCTL1"="default"
"DevicePCM1"="default"
"UseDirectHW"="yes"

[Software\\Wine\\DirectSound] 1300976391
"DefaultBitsPerSample"="32"
"DefaultSampleRate"="96000"
"HardwareAcceleration"="Full"

[Software\\Wine\\Drivers] 1300939175
"Audio"="alsa"

In WINE 1.3.15, this allows me to play and record at 32-bit and 48kHz. I
can also record at 32-bit and 96kHz; however, the 96kHz playback is very
distorted.

Curiously, the files I record in WINE (using Adobe Audition 3.0) play just
fine using Audacity on the same Linux host. But, playback within WINE is
the problem. Adjusting the buffer size in .asoundrc affects the distortion,
but I've not been able to fix the problem.

Any suggestions? Or, should I file this as a bug for dsound in wine?

Thanks!

Trevor

FWIW, here's my current .asoundrc file:

# Set default sound card
# Useful so that all settings can be changed to a different card here.
pcm.mia_out {
type hw
card 0
device 0
subdevice 0
#rate 96000
#format S32_LE
#channels 2
}
pcm.mia_in {
type hw
card 0
device 0
subdevice 0
#rate 96000
#format S32_LE
#channels 2
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
pcm mia_out
period_time 0
period_size 1024
buffer_size 8192
rate 96000
format S32_LE
channels 2
}

bindings {
0 0
1 1
}
}
# Allow reading from the default device.
# Also known as record or capture.
pcm.dsnooper {
type dsnoop
ipc_key 2048
#slave.pcm mia_in
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
pcm mia_in
period_time 0
period_size 1024
buffer_size 8192
rate 96000
format S32_LE
channels 2
}
bindings {
0 0
1 1
}
}

# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.duplex {
type asym
playback.pcm "dmixer"
capture.pcm "dsnooper"
}

###################
# CONVERSION PLUG #
###################
# Setting the default pcm device allows the conversion
# rate to be selected on the fly.
# duplex mode allows any alsa enabled app to read/write
# to the dmix plug (Fixes a problem with wine).

pcm.!default {
type plug
slave.pcm "duplex"
}
########
# AOSS #
########
# OSS dsp0 device (OSS needs only output support, duplex will break some
stuff)
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}

# OSS control for dsp0 (needed?...this might not be useful)
ctl.dsp0 {
type plug
slave.pcm "mia_out"
}
# OSS control for dsp0 (default old OSS is mixer0)
ctl.mixer0 {
type plug
slave.pcm "mia_out"


On 03/15/2011 09:11 PM, vitamin wrote:
Trevor Bowen wrote:
Thanks! Where would those registry settings be stored in the tree?
http://wiki.winehq.org/UsefulRegistryKeys



jordan

more than 16 bit audio

Post by jordan »

Hi Trevor,
Curiously, the files I record in WINE (using Adobe Audition 3.0) play just
fine using Audacity on the same Linux host. But, playback within WINE is
the problem. Adjusting the buffer size in .asoundrc affects the distortion,
but I've not been able to fix the problem.

Any suggestions? Or, should I file this as a bug for dsound in wine?
The distortion you are hearing are no doubt x-runs, in my mind. the
audio isn't getting to the system outputs (soundcard), from your app
fast enough. Your options are to either give it a bigger buffer/frames
size (which it looks like you have already done?)...

...or i would suggest not using the "directsound" driver, but instead
using wineASIO/jack.

however, i have never tested Adobe audition under linux or with
WineASIO, for that matter. (i haven't used it since it was Cooledit
pro, a long time ago). Obviously though, if you end up thinking about
running wineASIO, you will need to setup Jack-audio-connection-kit and
also have either a rt-kernel or a low-latency kernel.

I don't think the Directsound in Wine, is going to be good enough for
using a DAW like Adobe Audition, especially if you plan on using 96000
sample rate, and possibly live-effects or multi-tracking, to some
degree??? that just seems very unlikely to work well.

I use lots of windows pro-audio apps in wine, all of which i use with Jack.
My tascam Us-122L (usb2.0) soundcard supports 96000 ~ it works very
well with my Wine/audio apps. But, i also run an optimized RT-like
kernel. If i didn't, i would probably run into xruns / distortion and
other unwanted audio glitches.

that's my 2 cents

jordan
Trevor Bowen

more than 16 bit audio

Post by Trevor Bowen »

Hi Jordan,

I tried using JACK, and I had no problem playing back a 96 kHz / 32-bit wav
file that I recorded previously. Everything was much more responsive in
Adobe Audition. Thanks for the suggestion!

The only problem that cropped up was that the JACK inputs were missing. No
devices were available for recording!

I wonder if something is wrong with my .asoundrc file for JACK? Do you see
anything wrong with my .asoundrc file that I posted previously?

I assume you are using JACK with ALSA? Do you mind sharing your system and
user .asoundrc files? What is the command-line invocation you are using to
begin JACK?

Do you have doc or url that describes the kernel mods you have made for
realtime performance? I've made some, but I doubt it's very well tuned.
Here are the urls I used:

http://www.gentoo.org/proj/en/desktop/s ... altime.xml

http://en.gentoo-wiki.com/wiki/JACK

Thanks!

Trevor

On 03/24/2011 09:10 PM, jordan wrote:
Hi Trevor,
Curiously, the files I record in WINE (using Adobe Audition 3.0) play just
fine using Audacity on the same Linux host. But, playback within WINE is
the problem. Adjusting the buffer size in .asoundrc affects the distortion,
but I've not been able to fix the problem.

Any suggestions? Or, should I file this as a bug for dsound in wine?
The distortion you are hearing are no doubt x-runs, in my mind. the
audio isn't getting to the system outputs (soundcard), from your app
fast enough. Your options are to either give it a bigger buffer/frames
size (which it looks like you have already done?)...

...or i would suggest not using the "directsound" driver, but instead
using wineASIO/jack.

however, i have never tested Adobe audition under linux or with
WineASIO, for that matter. (i haven't used it since it was Cooledit
pro, a long time ago). Obviously though, if you end up thinking about
running wineASIO, you will need to setup Jack-audio-connection-kit and
also have either a rt-kernel or a low-latency kernel.

I don't think the Directsound in Wine, is going to be good enough for
using a DAW like Adobe Audition, especially if you plan on using 96000
sample rate, and possibly live-effects or multi-tracking, to some
degree??? that just seems very unlikely to work well.

I use lots of windows pro-audio apps in wine, all of which i use with Jack.
My tascam Us-122L (usb2.0) soundcard supports 96000 ~ it works very
well with my Wine/audio apps. But, i also run an optimized RT-like
kernel. If i didn't, i would probably run into xruns / distortion and
other unwanted audio glitches.

that's my 2 cents

jordan
jordan

more than 16 bit audio

Post by jordan »

Hey trevor,
I tried using JACK, and I had no problem playing back a 96 kHz / 32-bit wav
file that I recorded previously.  Everything was much more responsive in
Adobe Audition.  Thanks for the suggestion!
No problem. Jack provides the framework for performance that you
require, and using wineASIO provides the "low-latency, preformace,
etc" that ASIO would provide in a windows environment, but interfaces
with Jackd.(jack for audio, but ALSA for midi in Wine).
The only problem that cropped up was that the JACK inputs were missing.  No
devices were available for recording!

I wonder if something is wrong with my .asoundrc file for JACK?  Do you see
anything wrong with my .asoundrc file that I posted previously?
Not sure. What is your soundcard? Can you record audio files with
Linux apps, with ALSA and/or Jack??? (this would indicate that indeed
your .asoundrc is working. when using jack, do you have Qjackctl
installed, or maybe patchage? - these apps will provide a GUI for
jack, and maybe your inputs are available to send to Wine/Audition
3.0...? are you using "full duplex" in both your Wine application
(preferences?) and also Jack?
I assume you are using JACK with ALSA?  Do you mind sharing your system and
user .asoundrc files?  What is the command-line invocation you are using to
begin JACK?
Yes, I am using Jack/ALSA. I'll put something together, but email it
to you... I'm not gonna post it on Wine-list, as it strays from what
this particular list is all about.
Do you have doc or url that describes the kernel mods you have made for
realtime performance?  I've made some, but I doubt it's very well tuned.
Here are the urls I used:

   http://www.gentoo.org/proj/en/desktop/s ... altime.xml

   http://en.gentoo-wiki.com/wiki/JACK
I assume you know about Gentoo's Pro-audio Overlay??? ~ google it.
(because you are using gentoo right?).

anyway, give me a day or so and I will send a few links, and how i
personally go about things. I don't use Gentoo but have, and from
using BSD ~ i am fairly familiar with it. You will basically either
want to compile an RT-kernel, or a very recent Kernel (i currently am
running 2.6.37.3), combined with BFS scheduler ( which can work quite
well, for audio stuff ), and optimize a few other
things, as well.

jordan
Trevor Bowen

more than 16 bit audio

Post by Trevor Bowen »

Hi Jordan,
Not sure. What is your soundcard? Can you record audio files with
Linux apps, with ALSA and/or Jack??? (this would indicate that indeed
your .asoundrc is working. when using jack, do you have Qjackctl
installed, or maybe patchage? - these apps will provide a GUI for
jack, and maybe your inputs are available to send to Wine/Audition
3.0...? are you using "full duplex" in both your Wine application
(preferences?) and also Jack?
Even though I am experiencing problems with WINE+JACK, I can record in
Audacity using JACK at 32-bit and 96 kHz, so I don't really think there is a
problem with JACK or ALSA. However, I've come to learn that WINE can be
more picky than native Linux apps, as I have been able to record at the
highest quality that my soundcard offers in Linux-native Audacity for some
time. Previously, I was able to tweak my .asoundrc to make WINE happy and
record from ALSA, so I am guessing that there is something that I am missing
to make WINE happy with JACK+ALSA too.

Incidentally, I am using an Echo Mia PCI soundcard, which is a 24-bit/96 kHz
entry-level prosumer card.

I have QJackCtl installed, but outside of the obvious "start", "stop", and
"messages" button, I'm not sure how to make real connections or do any
debugging. ... Again, since recording and playback through JACK work
natively in Linux, I'm more suspicious of WINE and possibly my .asoundrc
file, so I haven't explored QJackCtl in depth yet.
I assume you know about Gentoo's Pro-audio Overlay??? ~ google it.
(because you are using gentoo right?).

anyway, give me a day or so and I will send a few links, and how i
personally go about things. I don't use Gentoo but have, and from
using BSD ~ i am fairly familiar with it. You will basically either
want to compile an RT-kernel, or a very recent Kernel (i currently am
running 2.6.37.3), combined with BFS scheduler ( which can work quite
well, for audio stuff ), and optimize a few other
things, as well.

I recently learned about the Gentoo pro-audio overlay, and I must admit I'm
a little leery of injecting any unnecessary instabilities into my system.
My audio work is limited to tape digitization and restoration. I have no
musical ability to speak of, so I really don't need the low latency or MIDI
support, like people who play and record. ... However, if I need to use the
pro-audio overlay to use Adobe Audition (or better) than I'm more than
willing to jump in. If you think wineASIO+JACK will be more helpful or
stable than JACK alone, I'll give it a try.

Thanks for the offer to send tidbits on your JACK invocation and .asoundrc
files.

Trevor
Locked