Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news


  

Author Topic: Portaudio settings ?  (Read 533 times)

0 Members and 1 Guest are viewing this topic.

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Portaudio settings ?
« on: January 02, 2019, 06:40:49 am »
Could someone please advise how to set Portaudio for my setup ?

Not aiming at the best possible performance at any cost but rather I want to privilege high compatibility/universality and safer/light settings if possible (gonna set this on another fairly different system or maybe two later, and I'd rather not bother people with my asking every time)

I've read what we have about Portaudio and googled it too but couldn't find a clear answer to that, rather confused.

Found somewhere that I could run mame64 -sound portaudio -v and got this out of it (attached capture of all the portaudio related entries)



In short with that, what easy/safe/light/highly-compatible-universal Portaudio settings would you suggest ?
Code: [Select]
#
# OSD SOUND OPTIONS
#
sound                     portaudio
audio_latency             1

#
# PORTAUDIO OPTIONS
#
pa_api                    none  ???
pa_device                 none  ???
pa_latency                0  ???

EDIT: atached a random log with my current incomplete portaudio settings
« Last Edit: January 02, 2019, 06:50:53 am by schmerzkaufen »
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1189
  • retro maniac
Re: Portaudio settings ?
« Reply #1 on: January 02, 2019, 01:26:37 pm »
groovymame game -sound portaudio -pa_api "Windows WDM-KS" -pa_latency 0.003334 -audio_latency 1

Some tutorial - https://www.youtube.com/watch?v=ZVPSlPnUxew

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Re: Portaudio settings ?
« Reply #2 on: January 02, 2019, 01:56:15 pm »
You mean like this ? bigblue's video didn't clear the whole thing for me sorry.

Damn that Portaudio thing would need a clear and clean complete tutorial somewhere, how to pick the right settings, why and what they do.

Code: [Select]
#
# OSD SOUND OPTIONS
#
sound                     portaudio
audio_latency             1

#
# PORTAUDIO OPTIONS
#
pa_api                    "Windows WDM-KS"
pa_device                 "Speakers (Realtek HD Audio output)"
pa_latency                0.003334
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

philexile

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • I want to build my a GroovyMame PC!
Re: Portaudio settings ?
« Reply #3 on: January 02, 2019, 02:50:37 pm »
The example you posted should work. Although, you need to specify which audio output option that you’ll be using.

Also, try pushing the audio to the lowest latency possible. I can’t remember off the top of my head, but I think I got it down to 0.00125. I’m using Windows 10.

You’ll know you’ve gone too far if the sound in games like Pac-Man take forever to trigger and when thy do they are distorted.

I noticed that if I have ANY application using audio Groovymame won’t launch. Just an FYI.

Random question: if frame_delay is set to 9 what is the approximate input latency for GroovyMame when using a CRT?


philexile

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • I want to build my a GroovyMame PC!
Re: Portaudio settings ?
« Reply #4 on: January 02, 2019, 02:52:55 pm »
Also, BigBlueFrontend’s channel is really informative and pointed me in the right direction many times. Does he post on this forum?

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1189
  • retro maniac
Re: Portaudio settings ?
« Reply #5 on: January 02, 2019, 03:11:53 pm »
I don't know how frame_delay works with portaudio. I didn't hear any suspicious sounds with frame_delay 2 and portaudio enabled.
If pa_device is not defined that first one (default/active?) is used.
« Last Edit: January 02, 2019, 03:14:48 pm by haynor666 »

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Re: Portaudio settings ?
« Reply #6 on: January 02, 2019, 03:14:55 pm »
The example you posted should work. Although, you need to specify which audio output option that you’ll be using.

Isn't it that "Windows WDM-KS" I have already put ?

I really don't fully get that mumbo jumbo, I guess I am expected to pick either WASAPI, WDM-KS, or...(or what other choice there is?) and then a corresponding output if I can identify it in the list. Is that right ?

Also, try pushing the audio to the lowest latency possible. I can’t remember off the top of my head, but I think I got it down to 0.00125.
You’ll know you’ve gone too far if the sound in games like Pac-Man take forever to trigger and when thy do they are distorted
Well I am especially not looking at doing that, I'd just like a setting that provides an improvement over the default in MAME and that should work for most games.
If the value Haynor pointed at is that, then I'll be happy.

Also what is it that value represents anyway ? 0.003334, 0.00125 -> how am I supposed to know what to put here ? how do yoiu guys find out because those are not random figures.

Random question: if frame_delay is set to 9 what is the approximate input latency for GroovyMame when using a CRT?
Should be the same as the original game running on its orignal hardware.

(Assuming you don't have other things getting in the way of course, like OS settings that might produce delay (dunno much about W10), low input polling, laggy controller or usb adapter, etc)
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1189
  • retro maniac
Re: Portaudio settings ?
« Reply #7 on: January 02, 2019, 03:18:02 pm »
If You do not specify device than default will be chosen and You have in log already marked default one. With latency You have to experiment. Personally I lowered to 0.01.

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Re: Portaudio settings ?
« Reply #8 on: January 02, 2019, 03:31:19 pm »
If You do not specify device than default will be chosen and You have in log already marked default one.
But how do I specify it ? haven't I done it already ? sorry but that's precisely what I'm asking.  :lol

With latency You have to experiment. Personally I lowered to 0.01
0.01 what? seconds? peanuts? why  0.003334, 0.00122, or 0.01 ? how do you get there ? that's also part of my question.  ;D

Sorry dude but I'm trying to understand what the settings mean, how to determine and pick them, and I still don't get what's going on...  :dunno
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7033
  • Designated spam hunter
Re: Portaudio settings ?
« Reply #9 on: January 02, 2019, 03:31:30 pm »
Also, BigBlueFrontend’s channel is really informative and pointed me in the right direction many times. Does he post on this forum?
He has posted here (and tried to post) many times under many usernames such as bigbluefrontend, bulbousbeard, sudopinion, Gamuhar, and his original username Driverman.   :badmood:


Scott

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6426
Re: Portaudio settings ?
« Reply #10 on: January 02, 2019, 03:40:39 pm »
Also, BigBlueFrontend’s channel is really informative and pointed me in the right direction many times. Does he post on this forum?
He has posted here (and tried to post) many times under many usernames such as bigbluefrontend, bulbousbeard, sudopinion, Gamuhar, and his original username Driverman.   :badmood:


Scott

I'd swear he's not the legendary Driverman/Torino.

He is bulbousbeard.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Re: Portaudio settings ?
« Reply #11 on: January 02, 2019, 04:10:54 pm »
Ok using the settings haynor posted and completed with the device which apparently I got right, I obtain the following;

which I guess works (placebo or not I've immediately sensed difference)

Code: [Select]
PortAudio: API MME has 3 devices
PortAudio: MME: "Mappeur de sons Microsoft - Output"
PortAudio: MME: "Haut-parleurs (Realtek High Def" (default)
PortAudio: MME: "Audio numérique (HDMI) (2- Péri"
PortAudio: API Windows DirectSound has 3 devices
PortAudio: Windows DirectSound: "Périphérique audio principal" (default)
PortAudio: Windows DirectSound: "Haut-parleurs (Realtek High Definition Audio)"
PortAudio: Windows DirectSound: "Audio numérique (HDMI) (2- Périphérique High Definition Audio)"
PortAudio: API Windows WASAPI has 2 devices
PortAudio: Windows WASAPI: "Haut-parleurs (Realtek High Definition Audio)" (default)
PortAudio: Windows WASAPI: "Audio numérique (HDMI) (2- Périphérique High Definition Audio)"
PortAudio: API Windows WDM-KS has 8 devices
PortAudio: Windows WDM-KS: "Output (Sortie HD Audio HDMI)"
PortAudio: Windows WDM-KS: "Line in at front panel (Green) (Line in at front panel (Green))"
PortAudio: Windows WDM-KS: "Line in at front panel (Pink) (Line in at front panel (Pink))"
PortAudio: Windows WDM-KS: "Line in at rear panel (Blue) (Line in at rear panel (Blue))"
PortAudio: Windows WDM-KS: "Line in at rear panel (Green) (Line in at rear panel (Green))"
PortAudio: Windows WDM-KS: "Speakers (Realtek HD Audio output)" (default)
PortAudio: Windows WDM-KS: "Mic in at rear panel (Pink) (Mic in at rear panel (Pink))"
PortAudio: Windows WDM-KS: "Mixage stéréo (Realtek HD Audio Stereo input)"
PortAudio: Using device "Speakers (Realtek HD Audio output)" on API "Windows WDM-KS"
PortAudio: Sample rate is 48000 Hz, device output latency is 4.33 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames

So I think I get how to determine and set the API and device, the delay value though is still a mystery.

Which APIs to privilege in general ? and avoid ?

PS: also what does it mean by "allowed additional buffering latency" ?
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

philexile

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • I want to build my a GroovyMame PC!
Re: Portaudio settings ?
« Reply #12 on: January 02, 2019, 06:09:22 pm »
According to BigBlueFrontend's video, Windows WDM-KS is the best to go with. That's what I used. I'm not sure of the differences. I Googled MME last night and it appears to be a depreciated API. I'm no expert though – maybe Calamity can elaborate.

Quote
He has posted here (and tried to post) many times under many usernames such as bigbluefrontend, bulbousbeard, sudopinion, Gamuhar, and his original username Driverman.   :badmood:

He is bulbousbeard.

Well that sounds ominous.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1189
  • retro maniac
Re: Portaudio settings ?
« Reply #13 on: January 03, 2019, 04:34:54 am »
I've simply found this tutorial on internet because eiusdemmodi is still down. Since it is probably from author of frontend I assumed he knows what he is saying.

cools

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 594
  • Arcade Otaku sysadmin...
    • Arcade Otaku
Re: Portaudio settings ?
« Reply #14 on: January 03, 2019, 12:06:55 pm »
Sorry dude but I'm trying to understand what the settings mean, how to determine and pick them, and I still don't get what's going on...  :dunno

It's a bit trial and error - the best settings depend on what OS, what sound card driver you have and what system spec. Much like frame_delay but for sound.

IIRC the allowed additional is the normal mame audio_latency, and that weird 0.0033 number is the lowest possible allowed value for the WASAPI driver.
Please don't PM me with support questions. Ask in public so everyone can learn!

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Re: Portaudio settings ?
« Reply #15 on: January 04, 2019, 05:38:16 am »
It's a bit trial and error - the best settings depend on what OS, what sound card driver you have and what system spec. Much like frame_delay but for sound.

IIRC the allowed additional is the normal mame audio_latency, and that weird 0.0033 number is the lowest possible allowed value for the WASAPI driver.

Thanks cools, though I think I'll get all the possible answers one could think of except the one I'm looking for.  :lol
What I'm trying to understand is what is that value, its nature, how do you get it, where, how does it corrrespond to a certain miliseconds time as reposted in the log.
What is the formula for converting that turns this 0.003334 into this;
Code: [Select]
PortAudio: Sample rate is 48000 Hz, device output latency is 4.33 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames
(also the "normal mame audio_latency" do you mean this works as a ceiling or something ? what's the relationship between these two settings ?)

Could it be that evryone just copied stuff at random from the first guys who did something knowingly, and then entered different random figures by themselves for testing without understanding ?
I doubt so because if one can trial and error that feature he has to understand how to control this essential point.

What I don't doubt is since Portaudio has been around, extremely few people use it, prefered build notwithstanding, or as I've seen multiple times they just set useless incomplete settings like I was doing.
The reason ? the usual: there's nothing sufficiently explanatory and comprehensive written on it that would make the average Joe user adopt the feature, there's only a number of posts here and there on the internet, BYOAC has the most afaik and it's only people exchanging like they already got the mechanics and it's natural to set x or y values, though without explaining the bottom of it.

I'm going to leave it as this for now, maybe intealls is the only person who can actually explain it all.


EDIT: someone is writing tutorials that include GroovyMAME features it seems, and here he also wrote something about Portaudio.
https://www.arcade-tutorials.de/tutorials/update-groovymame-mit-portaudio-implementierung
But it's in German...
« Last Edit: January 04, 2019, 06:01:45 am by schmerzkaufen »
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

pubjoe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 52
Re: Portaudio settings ?
« Reply #16 on: January 04, 2019, 11:15:10 am »
Is it not just 1 = one second and 0.001 = one millisecond?
« Last Edit: January 04, 2019, 11:18:23 am by pubjoe »

alex2005

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • I want to build my own arcade controls!
Re: Portaudio settings ?
« Reply #17 on: January 04, 2019, 03:03:27 pm »
if you have an integrated Realtek soundcard card you may use "windows directsound" instead. This is the only setting that worked for me.
Try Cadillacs and Dinousaurs and see if you get sound.

philexile

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • I want to build my a GroovyMame PC!
Re: Portaudio settings ?
« Reply #18 on: January 04, 2019, 11:39:13 pm »
But it's in German...

Google translate for the win:

"In my GroovyMAME system with Realtek Soundchip I get at API Windows WDM-KS with pa_latency 0.001 2ms output latency. With Windows WASAPI and pa_latency 0.003334 3.3ms output latency. For me Windows WDM-KS runs much better on this system."

I think that answers the question, right? Portaudio is a good thing. :)

cools

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 594
  • Arcade Otaku sysadmin...
    • Arcade Otaku
Re: Portaudio settings ?
« Reply #19 on: January 05, 2019, 04:48:27 am »
WDM = Windows 98 audio system
WASAPI = Windows 7+ audio system

From memory those numbers are the lowest you can use, anything lower stops audio working.

Best bet to understand might be to study portaudio documentation rather than MAME. Good luck!
https://app.assembla.com/wiki/show/portaudio/BufferingLatencyAndTimingImplementationGuidelines
Please don't PM me with support questions. Ask in public so everyone can learn!

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • I want a large cream coffee
Re: Portaudio settings ?
« Reply #20 on: January 05, 2019, 06:15:25 am »
I think that answers the question, right?

Actually no it leaves my question unanswered.  :P  (log doesn't return 3.3ms latency when I set 0.003334, that confused me like 'wtf does it do actually')

I wasn't certain what the pa_latency values meant because the results in a log/-v don't match (also how come people find and use values as precise as 0.003334)
Portaudio arrived in MAME without even a basic introduction of how it works/what's its principle, how to use the options in details using log's material, nor written guidelines to adjust the latency.

Looking at the old thread if you compile intealls sentences scattered throught, it becomes a sort of miniguide (that's why I hate forums as a primary documentation resource in place of proper writeups/wikis etc), still yet rather laconic.

Best bet to understand might be to study portaudio documentation rather than MAME. Good luck!
https://app.assembla.com/wiki/show/portaudio/BufferingLatencyAndTimingImplementationGuidelines

Now THIS is interesting, I had absolutely no idea Portaudio was that kind of program, which is why I couldn't make any sense of the discrepancy in settings and results.
For me it was something like using d3d9ex to get rid of unnecessary extra buffer frames, rather it looks something like frame_delay or run-ahead but for sound.

(thanks cools, I've searched for a page like that, guess I've missed it from the portaudio website)

Portaudio is a good thing. :)

Sure it is, not questioning that. The improvement is audible (and quite at that, you only realize how audio lag sucks after trying Portaudio with working settings)
« Last Edit: January 05, 2019, 06:21:29 am by schmerzkaufen »
GroovyMAME oddball LCD user: W7 64, viewsonic vx3211-mh, i5-4690k @4.1GHz, Rx 570, crt_emudriver 2.0b15

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31