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: Is GroovyMame + ASIO still a thing?  (Read 4261 times)

0 Members and 1 Guest are viewing this topic.

theAEoN

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
Is GroovyMame + ASIO still a thing?
« on: January 12, 2017, 01:59:26 pm »
Looking back now, it's been almost a year since I've updated GroovyMame and crtemudriver. For a while I used MALA, but my friends really like HyperSpin and the only problem I've encountered with it is on closing MAME, I lose sound in HyperSpin. I've read that this has to do with ASIO and am now wondering if it's worth it to keep using ASIO or has the sound latency improved in GroovyMame since last summer that I can do without now?

If I do stick with ASIO, any tips/workarounds on that sound bug when returning to HyperSpin?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #1 on: January 12, 2017, 06:54:45 pm »
Hi, hopefully in the near future there will be no reason to use the ASIO build, a much better option is being considered for inclusion in mainline.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5523
Re: Is GroovyMame + ASIO still a thing?
« Reply #2 on: January 13, 2017, 11:24:25 am »
Hi, hopefully in the near future there will be no reason to use the ASIO build, a much better option is being considered for inclusion in mainline.

https://git.redump.net/mame/commit/?id=32c13ad9292e4138591e1761ddcfc64d607f3034

It's in! Congratulations intealls!

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

keropi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 127
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #3 on: January 13, 2017, 12:55:04 pm »
If I understand correctly PortAudio is the successor to ASIO?
« Last Edit: January 13, 2017, 12:56:53 pm by keropi »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #4 on: January 13, 2017, 03:02:05 pm »
Hi, hopefully in the near future there will be no reason to use the ASIO build, a much better option is being considered for inclusion in mainline.

https://git.redump.net/mame/commit/?id=32c13ad9292e4138591e1761ddcfc64d607f3034

It's in! Congratulations intealls!

Thanks! :) Also, don't forget that PortAudio was R.Belmont's idea from the start, and I borrowed some things from his initial implementation.

Regarding GM, it's possible we might need the resampler for syncrefresh, we're going to see under/overruns with very tight latencies simply due to resampler granularity. Due to the buffer handling in the PA implementation most of them will probably not be audible. I have a working resampler up and running, if people actually are able to notice audio issues with GM+PA (I can't), I'll release a small patch with only the resampler, which can be put on top of mainline+GM.
« Last Edit: January 13, 2017, 03:04:41 pm by intealls »

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: Is GroovyMame + ASIO still a thing?
« Reply #5 on: January 15, 2017, 03:11:58 am »
Is PortAudio ready to use right now in mainline if I compile latest GIT with pull request #1973 applied?
https://github.com/mamedev/mame/commit/2fd881e559bb69b1bde1023d17baabb31b953321

 I noticed new options in the mame.ini
What do I set for the pa_api and pa_device?

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

#
# PORTAUDIO OPTIONS
#
pa_api                    none
pa_device                 none
pa_latency                0

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #6 on: January 15, 2017, 10:34:52 am »
Is PortAudio ready to use right now in mainline if I compile latest GIT with pull request #1973 applied?

Yep!

I noticed new options in the mame.ini
What do I set for the pa_api and pa_device?

You can see the supported devices and APIs with -v in the log. However, the easiest way is to define the API and latency to use. The default device of the selected API is then used.

Examples:

Code: [Select]
mame64 -sound portaudio -pa_api "Windows WASAPI" -pa_latency 0.003334 -audio_latency 1

or

mame64 -sound portaudio -pa_api "Windows WDM-KS" -pa_latency 0.001 -audio_latency 1

Also, the same rules apply for PortAudio as for the ASIO build, which is that -nosleep and -priority 1 might help with very low latencies.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: Is GroovyMame + ASIO still a thing?
« Reply #7 on: January 15, 2017, 05:22:58 pm »
Thank you very much intealls!!!!  ;D

I will sit down tonight and do some gaming with the examples you've provided. I appreciate your work and thanks for answering :)

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: Is GroovyMame + ASIO still a thing?
« Reply #8 on: January 15, 2017, 08:27:51 pm »
OK, I think I've got it working correctly, but not 100% sure.

Here's output of -v
http://pastebin.com/hyT9QPR2

Here's contents of mame.ini with sleep set to 0 and priority set to 1

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

#
# PORTAUDIO OPTIONS
#
pa_api                    "Windows WASAPI"
pa_device                 "Headset Earphone (3- Corsair Ga"
pa_latency                0.003334

Not sure if those are good latency numbers and the numbers of different devices somewhat complicates things, but seems much better than dsound or auto.
« Last Edit: January 15, 2017, 08:48:46 pm by B2K24 »

Paradroid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 428
    • SCART Hunter
Re: Is GroovyMame + ASIO still a thing?
« Reply #9 on: January 15, 2017, 10:00:48 pm »
This is a really exciting development guys! Nice work! :)

Sent from my SM-A300Y using Tapatalk

My MAME/SCART/CRT blog: SCART Hunter

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #10 on: January 16, 2017, 05:19:48 am »
Not sure if those are good latency numbers and the numbers of different devices somewhat complicates things, but seems much better than dsound or auto.

This should be equivalent to the ASIO build! You can play around with -pa_latency and -audio_latency to add delays (e.g. -pa_latency 0.050 -audio_latency 3), or just skip that and use -pa_api "Windows MME". You'll definitely notice the loveliness of low latency audio.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: Is GroovyMame + ASIO still a thing?
« Reply #11 on: January 16, 2017, 05:48:39 am »
WOW! Amazing!

I changed to your posted settings and it's a definite improvement. Thanks so much  ;D


Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5523
Re: Is GroovyMame + ASIO still a thing?
« Reply #12 on: January 24, 2017, 12:25:40 pm »
I'm testing it from git, man it's like night and day! This one is going to be a big release!  :applaud:
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

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #13 on: January 24, 2017, 04:42:27 pm »
I'm testing it from git, man it's like night and day! This one is going to be a big release!  :applaud:

Nice! :)

Once you get used to low latency audio, it's hard to go back. ASIO was always a bit fiddly to get up and running, but this just works, PortAudio is brilliant.

brad808

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 795
Re: Is GroovyMame + ASIO still a thing?
« Reply #14 on: January 24, 2017, 06:57:53 pm »
I'm looking forward to the next release! Thanks guys

Dacasks

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #15 on: January 26, 2017, 01:29:01 pm »
Just tested 0182 and with portaudio is ACE! Good Job!

However, sadly I can't make it work properly sampled at 22500.

Most games sound too metallic/edgy at 48000, so I would ask if there's any way to get the 22500 sound but with reduced latency.

One thing I noticed, also, is that input lag increases if the samplerate is lowered. Don't know if it's a new thing or it already happened under older vers. (I mainly used 0.171 ASIO sampled at 22500, so, I couldn't notice difference then)

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #16 on: January 26, 2017, 01:41:44 pm »
Most games sound too metallic/edgy at 48000, so I would ask if there's any way to get the 22500 sound but with reduced latency.

What options are you using? Neither WASAPI nor WDM-KS will initialize with a sampling rate of 22050 on my W10 rig (PortAudio error: Invalid device). This was supported by BASSASIO, which most likely upsampled the input data to whatever the sound card wanted (MAME produced 22050 samples/s, BASSASIO made them 48000/s). A low pass filter on the output data should produce similar results.

One thing I noticed, also, is that input lag increases if the samplerate is lowered. Don't know if it's a new thing or it already happened under older vers. (I mainly used 0.171 ASIO sampled at 22500, so, I couldn't notice difference then)

What do you mean by this?
« Last Edit: January 26, 2017, 01:49:09 pm by intealls »

Dacasks

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #17 on: January 26, 2017, 02:09:31 pm »
My bad, I meant 22050

I tried with both apis.

I'm using Windows 7. I can make the sound output using pa_latency 0.013334

At 22050 sounds come high pitched/metallic compared to 0.171 ASIO at 22050 anyway, so, it's better stick to 48000 right now (it's specially noticeable with Ghouls n Ghosts :) )

I meant that I noticed that, if I lower the samplerate to 11025, for example, I can notice an increased delay on input. Difference between 22050 and 48000 is subtle, to the point I can't notice, but, 11025 you can really feel the difference comparing it to 48000. But it was noticed only by the "feel" of it, I didn't measure anything. I could be wrong, but, at 11025 it is really noticeable the input lag increase.

Dacasks

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #18 on: January 26, 2017, 02:14:57 pm »
Just tried again the "samplerate difference on input lag"... and now I'm not having any difference at all, so, I take that back lol.

Maybe I changed another parameter while I was messing with it... but with Final Fight it was really noticeable from I recall. I'll try more tomorrow again, too tired lolz.

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #19 on: January 26, 2017, 03:09:30 pm »
Maybe I changed another parameter while I was messing with it... but with Final Fight it was really noticeable from I recall. I'll try more tomorrow again, too tired lolz.

Please try to reproduce this.

I'm using Windows 7. I can make the sound output using pa_latency 0.013334

At 22050 sounds come high pitched/metallic compared to 0.171 ASIO at 22050 anyway, so, it's better stick to 48000 right now (it's specially noticeable with Ghouls n Ghosts :) )

I meant that I noticed that, if I lower the samplerate to 11025, for example, I can notice an increased delay on input. Difference between 22050 and 48000 is subtle, to the point I can't notice, but, 11025 you can really feel the difference comparing it to 48000. But it was noticed only by the "feel" of it, I didn't measure anything. I could be wrong, but, at 11025 it is really noticeable the input lag increase.

Yeah, BASSASIO also seems to place a pretty hefty low-pass filter on the output, which some like and some don't. Sinc resampling does this "automatically", and the cutoff can be tuned.

I don't know what PA (and Windows in succession) will do with this configuration... WASAPI/WDM-KS is not designed to work with such low sample rates. DirectSound is also supported with PA, you could see how low you can go latency-wise with -pa_api "Windows DirectSound". This will support the lower rates.

Dacasks

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #20 on: January 27, 2017, 09:37:07 am »
Maybe I changed another parameter while I was messing with it... but with Final Fight it was really noticeable from I recall. I'll try more tomorrow again, too tired lolz.

Please try to reproduce this.


Yeah, BASSASIO also seems to place a pretty hefty low-pass filter on the output, which some like and some don't. Sinc resampling does this "automatically", and the cutoff can be tuned.

I don't know what PA (and Windows in succession) will do with this configuration... WASAPI/WDM-KS is not designed to work with such low sample rates. DirectSound is also supported with PA, you could see how low you can go latency-wise with -pa_api "Windows DirectSound". This will support the lower rates.

Nope, must've been something else, so sorry for pointing that out. But if I managed to reproduce I'll inform, surely.

NOW, the Directsound Api does work! I mean, I have to test more games if the sound comes right comparing it to regular Mame but, I managed to lower it too 11025 (pretty muffled sound, of course).  I'll try again with the other api's if the results are the same (since now I can compare easily). It does sound different from Asio, and, must be the low pass filter you talk.

Anyway, shows it's a great improvement from now on, so thanks again!

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #21 on: January 27, 2017, 11:59:43 am »
NOW, the Directsound Api does work! I mean, I have to test more games if the sound comes right comparing it to regular Mame but, I managed to lower it too 11025 (pretty muffled sound, of course).

Also, just to be clear, when you use the DirectSound API, latency will be much higher than with WASAPI/WDM-KS. If you use -v, you can see approximately how much is added.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: Is GroovyMame + ASIO still a thing?
« Reply #22 on: January 27, 2017, 01:15:08 pm »
I'm not sure if I'm reading this right, but on my Windows 10 Pro X64 system it seems like it's better to use "Windows WASAPI" over "Windows WDM-KS"
I suppose there's also some bottleneck when it comes down to the actual physical device?

mame64 -sound portaudio -pa_api "Windows WASAPI" -pa_latency 0.003334 -audio_latency 1 sf2 -v

Code: [Select]
PortAudio: Sample rate is 48000 Hz, device output latency is 3.33 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames

mame64 -sound portaudio -pa_api "Windows WDM-KS" -pa_latency 0.003334 -audio_latency 1 sf2 -v

Code: [Select]
PortAudio: Sample rate is 48000 Hz, device output latency is 10.00 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #23 on: January 27, 2017, 01:23:36 pm »
mame64 -sound portaudio -pa_api "Windows WDM-KS" -pa_latency 0.003334 -audio_latency 1 sf2 -v

Code: [Select]
PortAudio: Sample rate is 48000 Hz, device output latency is 10.00 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames

Try -pa_api "Windows WDM-KS" -pa_latency 0.001. When the API cannot use the specified latency, PA reverts to the default.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: Is GroovyMame + ASIO still a thing?
« Reply #24 on: January 27, 2017, 03:19:33 pm »
I just tried that and it didn't change the numbers. It's OK it's sounds amazing anyway :)

Thank You!

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #25 on: January 27, 2017, 03:33:41 pm »
I just tried that and it didn't change the numbers. It's OK it's sounds amazing anyway :)

Ok, you could try to update your sound card drivers and see if that makes a difference. But if WASAPI works with lower latencies, I'd stick to that.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #26 on: January 27, 2017, 04:17:06 pm »
Since WASAPI is not available in XP what choices are left for best audio setup?
For now I set Windows-WDM-KS and latency 0.003.

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #27 on: January 27, 2017, 04:43:32 pm »
Since WASAPI is not available in XP what choices are left for best audio setup?
For now I set Windows-WDM-KS and latency 0.003.

If that works, I'd use that. GM works brilliantly on W7, so unless there's a very good reason NOT to upgrade, you probably should.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #28 on: January 29, 2017, 08:02:15 am »
Yeah, works but I didn't tested all other options but what I've read  WDM would better option than MME. Is this right?

On windows 7 I get  some crashed with some options combination so another question - are there any safe ranges for latency and prohibited options combinations?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #29 on: January 29, 2017, 10:35:24 am »
Yeah, works but I didn't tested all other options but what I've read  WDM would better option than MME. Is this right?

On windows 7 I get  some crashed with some options combination so another question - are there any safe ranges for latency and prohibited options combinations?

WDM-KS should be the best option, which is _slightly_ better than WASAPI. MME is ancient, but actually seems to provide better latency than DirectSound under some circumstances on modern Windows systems, at least on my test rigs.

What was the crash you got on Windows 7? Can you please try to reproduce this and provide more info (API, latency, audio chip etc)?

Regarding safe ranges - if everything works as it should, WASAPI/0.003334 or WDM-KS/0.001 should be safe.

pakoman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 119
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #30 on: January 29, 2017, 11:04:57 am »
Code: [Select]
PortAudio: Using device "Speakers (Auricular y altavoces de HD Audio)" on API "Windows WDM-KS"
PortAudio: Sample rate is 48000 Hz, device output latency is 2.00 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames
Sound: overflows=12 underflows=8

Code: [Select]
PortAudio: Using device "Altavoces (Dispositivo de High Definition Audio)" on API "Windows WASAPI"
PortAudio: Sample rate is 48000 Hz, device output latency is 3.33 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames
Sound: overflows=3 underflows=0

I've got these results with the samples Calamity posted:
Code: [Select]
mame64 -sound portaudio -pa_api "Windows WASAPI" -pa_latency 0.003334 -audio_latency 1

or

mame64 -sound portaudio -pa_api "Windows WDM-KS" -pa_latency 0.001 -audio_latency 1


Windows 10, core i5 m430. In this test WASABI sounds better as WDM-KS goes often out of tune.

EDIT: in older Mame releases I get 48 ms.
« Last Edit: January 29, 2017, 11:29:11 am by pakoman »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #31 on: January 29, 2017, 11:12:37 am »
Windows 10, core i5 m430. In this test WASABI sounds better as WDM-KS goes often out of tune.

Ok, one thing to keep in mind with low-latency audio is that it is important to have as few other applications running when using it. For instance, only have MAME running, and if problems are encountered, try using -nosleep and -priority 1. This will probably kill the battery life if run on a laptop though.

But if WASAPI works better on your rig, the latency difference should only be 1.333 ms... Which you'd have to be super-human to notice.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #32 on: January 29, 2017, 11:23:47 am »
Again, this time in this topic additional raport. Info about crash under Windows 7x64:

Pakiet błędów , typ 0
Nazwa zdarzenia: APPCRASH
Odpowiedź: Niedostępny
Identyfikator pliku Cab: 0

Sygnatura problemu:
P1: groovymame32_182.exe
P2: 0.182.0.0
P3: 00000000
P4: ntdll.dll
P5: 6.1.7601.19135
P6: 56a1c6fa
P7: c0000005
P8: 00033593
P9:
P10:

pakoman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 119
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #33 on: January 29, 2017, 11:57:42 am »
Windows 10, core i5 m430. In this test WASABI sounds better as WDM-KS goes often out of tune.

Ok, one thing to keep in mind with low-latency audio is that it is important to have as few other applications running when using it. For instance, only have MAME running, and if problems are encountered, try using -nosleep and -priority 1. This will probably kill the battery life if run on a laptop though.

But if WASAPI works better on your rig, the latency difference should only be 1.333 ms... Which you'd have to be super-human to notice.

Thanks for the tip. I was compiling at the same time  ;D

Tried again without compiling and noticed no sound distortions at all.

Being said that it seems that WASABI is more versatile as tolerates much better other running programs without noticeable harm to the sound quality (at the cost of 1.333ms).

In the other hand WDM-KS has better latency but it's more prone to interferences.

RobertJ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
Re: Is GroovyMame + ASIO still a thing?
« Reply #34 on: January 29, 2017, 01:18:32 pm »
I'm running Arch Linux + Attract Mode front end, when I launch MAME from the command line with portaudio enabled, it works just fine. If I launch it from AM I get no sound and it says
Code: [Select]
"portaudio error invalid number of channels" :(

I get sound if I disable portaudio.

Has anyone else had this issue?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #35 on: January 29, 2017, 01:23:06 pm »
Code: [Select]
"portaudio error invalid number of channels"

Could you please post the full log output with -v?

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #36 on: January 29, 2017, 04:22:37 pm »
Did anyone tried audio_latency lower than 1.0? If I set audio_latency below 1. Also pa_latency with some values causing crashes.
« Last Edit: January 29, 2017, 04:29:15 pm by haynor666 »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #37 on: January 29, 2017, 04:37:41 pm »
Did anyone tried audio_latency lower than 1.0? If I set audio_latency below 1.

This should not be done, Calamity outlined this in the initial post, and will absolutely make GM crash. A setting of 1 will use the lowest latency, and works adaptively. So use 1, 2, 3, 4 or 5.

Also pa_latency with some values causing crashes.

Please post detailed information so that it makes it possible to understand what's going on (GM log and the OS used at minimum).
« Last Edit: January 29, 2017, 04:39:33 pm by intealls »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5523
Re: Is GroovyMame + ASIO still a thing?
« Reply #38 on: January 29, 2017, 04:47:15 pm »
Please guys, if you really want to help provide proper logs, it's really frustrating that in January 2017 people keep posting bug reports on this forum without a damned log.
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

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #39 on: January 29, 2017, 05:02:50 pm »
Problem is there isn't anything interesting in log :/ All API crash groovymame32.

« Last Edit: January 29, 2017, 05:05:53 pm by haynor666 »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #40 on: January 29, 2017, 05:09:05 pm »
Problem is there isn't anything interesting in log :/ All API crash groovymame32.

No, but it helps rule out issues, and it provides a starting point for debugging, so it should always be provided.

Could you try mainline MAME, and see if that crashes as well?

Edit: Also, please post your ini.
« Last Edit: January 29, 2017, 05:10:54 pm by intealls »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5523
Re: Is GroovyMame + ASIO still a thing?
« Reply #41 on: January 29, 2017, 05:11:55 pm »
Problem is there isn't anything interesting in log

Interesting for whom?
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

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #42 on: January 29, 2017, 05:19:09 pm »
Problem is there isn't anything interesting in log

Interesting for whom?

Well, I didn't find anything related to crash or audio issues so I thought it's not needed.

Tested official mame x32 and x64. 32bit version crash, 64bit version works, at least right now with exactly the same options.
The same goes to groovymame x32 and x64.

I didn't create any ini, I'm using only command line.
« Last Edit: January 29, 2017, 05:25:12 pm by haynor666 »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #43 on: January 29, 2017, 05:24:33 pm »
Problem is there isn't anything interesting in log

Interesting for whom?

Well, I didn't find anything related to crash or audio issues so I thought it's not needed.

Tested official mame x32 and x64. 32bit version crash, 64bit version works, at least right now with exactly the same options.
The same goes to groovymame x32 and x64.

Ok, thanks. Please post logs and relevant inis in the future. Looks I need to look into what happens with the 32-bit version. So for now, everyone please use the 64-bit version.

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #44 on: January 29, 2017, 05:40:57 pm »
Problem is there isn't anything interesting in log

Interesting for whom?

Well, I didn't find anything related to crash or audio issues so I thought it's not needed.

Tested official mame x32 and x64. 32bit version crash, 64bit version works, at least right now with exactly the same options.
The same goes to groovymame x32 and x64.

I didn't create any ini, I'm using only command line.

Because you posted the logs of both 32 and 64 bit versions, I have now been able to reproduce the issue in less than 5 minutes, which makes it possible for me to try to find a fix.

Anyway, stay away from the 32-bit builds for now.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1835
  • Make It So!
Re: Is GroovyMame + ASIO still a thing?
« Reply #45 on: January 29, 2017, 06:17:49 pm »
OK im using the following on my Windows 10 Gsync monitor setup....

#
# OSD SOUND OPTIONS
#
sound                     portaudio
audio_latency             1.0

#
# PORTAUDIO OPTIONS
#
pa_api                    Windows WASAPI
pa_device                 none
pa_latency                0.003334

but the audio keeps going out of tune do i need to up the pa_latency?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #46 on: January 29, 2017, 06:39:59 pm »
OK im using the following on my Windows 10 Gsync monitor setup....

#
# OSD SOUND OPTIONS
#
sound                     portaudio
audio_latency             1.0

#
# PORTAUDIO OPTIONS
#
pa_api                    Windows WASAPI
pa_device                 none
pa_latency                0.003334

but the audio keeps going out of tune do i need to up the pa_latency?

(copy-paste from a previous post, I really need to make a big post outlining stuff)

One thing to keep in mind with low-latency audio is that it is important to have as few other applications running when using it. For instance, only have MAME running, and if problems are encountered, try using -nosleep and -priority 1.

Please try mainline MAME (64-bit) and see if the sound goes out of tune.

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #47 on: January 29, 2017, 08:16:53 pm »
The builds below fix a buffer issue. If you encounter problems, please try these before reporting.

32 bit groovy
https://mega.nz/#!KMRnCAIa!pJM8LP3a2THP7w4phd_FXYnVuUjlBVTkzWY7w3Dyx24

64 bit groovy
https://mega.nz/#!6EoCACSD!hr0Gn6vYpdFyNFPfvbAGhTwCSiYpVM9QhIXd6WsxjBM

mdd45

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #48 on: January 30, 2017, 02:24:00 am »
Thanks for those builds. Just tried 32bit version on winxp pc and no more crashes and ntdll.dll errors. Return to groovymame basic gui after exiting a game is also working fine.

But now i have some sound issues with music loosing sync when playing with games like mslug or sfa3 for example, that with previous builds with same settings weren't there....

my settings are:
sound                     portaudio
audio_latency             1
pa_api                    "Windows WDM-KS"
pa_device                 none
pa_latency                0.001

what settings i could try changing for better sound quality?

P.S. tried with pa_latency 0.03 and now it seems that it works fine. I think we have a fix. Thanks intealls for all the efforts!!!

P.S. 2: did more tests with latency value and now seems that even with 0.001 everything is ok. maybe my pc was doing something in the background. I'll do more tests and verify.

A question: pa_latency 0.03 for example  is better than "without using portaudio" at all ?

« Last Edit: January 30, 2017, 02:55:56 am by mdd45 »

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #49 on: January 30, 2017, 07:30:14 am »
I did some tests. Under 7x64 everything is fine, no crashes. Under XP x32 also even with very low latencies.

Funny thing is latency could be set 0.0001 with WDM-KS and still sound is ok. Judging from log if I do not set pa_api then MME is default (which is the slowest).

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #50 on: January 30, 2017, 08:25:01 am »
I did some tests. Under 7x64 everything is fine, no crashes. Under XP x32 also even with very low latencies.

Great. Thanks for testing this, and if you find anything else please report it here (with logs!).

Funny thing is latency could be set 0.0001 with WDM-KS and still sound is ok. Judging from log if I do not set pa_api then MME is default (which is the slowest).

PortAudio reverts to the default (which on Windows is MME) when the API isn't specified. Since a bit of tweaking might be needed for proper results, I actually think this is quite good.

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #51 on: January 30, 2017, 08:31:01 am »
A question: pa_latency 0.03 for example  is better than "without using portaudio" at all ?

Maybe, it depends on many variables (OS, API, etc). The actual output latency is controlled, so you will get a fairly consistent output latency with PA, also with WDM-KS I'd say it is better.

I should do some tests on this.

But the biggest advantage is of course the use of WASAPI/WDM-KS, which gives the lowest possible latency. The other APIs are in there so people can try them out and find the one that works best.
« Last Edit: January 30, 2017, 08:42:24 am by intealls »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #52 on: February 01, 2017, 01:55:47 pm »
Now, with the monumental 32-bit buffer f-ck-up out of the way, it's time for some measurements!

The insert coin sound of pacman was benchmarked. The falling edge of the yellow plot highlights when the keystroke has been registered by the USB keyboard, and input into the USB report to be sent at the next poll. The blue one is the sound being played.

About 100 or so samples were taken per image, and the best-ish one is presented (I moved the cursor around to note the best one, not actually pictured in some shots). This sample should be the least affected by USB poll rate granularity, number of samples in buffer, frame timing etc etc.

Windows 7, CRT Emudriver, integrated audio, GroovyMAME with frame_delay 8 and the following settings were used

Code: [Select]
-sound portaudio -pa_api "Windows WDM-KS" -pa_latency 0.001 -nosleep -priority 1 -audio_latency 1
-sound portaudio -pa_api "Windows WASAPI" -pa_latency 0.003334 -nosleep -priority 1 -audio_latency 1
-sound portaudio -pa_api "Windows MME" -pa_latency 0.017 -nosleep -priority 1 -audio_latency 1
-sound portaudio -pa_api "Windows DirectSound" -pa_latency 0.017 -nosleep -priority 1 -audio_latency 1
-sound dsound -nosleep -priority 1 -audio_latency 1

Interestingly enough, MME is not the slowest, as suggested by haynor666 a few posts up. It's about 20 ms better than DirectSound with the same settings.

Mainline MAME without waitvblank performed almost exactly the same as GM+FD, they were so similar I didn't bother with screencaps.

PortAudio DirectSound and -sound dsound with the above settings perform pretty much the same.

I also did a test with the MAME driver and RA (with frame_delay 5), and audio latency set to 8 ms. In actuality, the latency turned out to be closer to 108 ms, with heavily distorted sound, as can be seen in the plot.

So, the conclusion is that the use of WASAPI/WDM-KS eats away about 60 ms of latency compared to dsound with audio_latency 1 on the above test setup. Not all configurations handle audio_latency 1 with dsound either, so it is likely to be more reliable as well as reduce the actual latency even further. Good times!

To compare WDM-KS to the ASIO build, I did a quick comparison identical to the one in this post http://forum.arcadecontrols.com/index.php/topic,141869.msg1469093.html#msg1469093 (pbobble), and the latency is just as low.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 974
  • retro maniac
Re: Is GroovyMame + ASIO still a thing?
« Reply #53 on: February 01, 2017, 02:46:49 pm »
So, after all WDM-KS is little better than WASAPI.

RobertJ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
Re: Is GroovyMame + ASIO still a thing?
« Reply #54 on: February 01, 2017, 05:13:46 pm »
Here's my log for failing GM with pulseaudio on Arch Linux when launched from the Attract Mode emulator... works fine when launched directly or when launched from AM with alsa as the device rather than pulseaudio:

Code: [Select]
Starting Attract-Mode v2.2.0 (Linux)
Config: /home/robee/.attract/attract.cfg

*** Initializing display: 'mame'
 - Loaded master romlist 'mame' in 286 ms (33918 entries kept, 0 discarded)
 - Constructed 2 filters in 132 ms (67836 comparisons)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Error opening input file: /usr/local/share/attract/intro/intro_4x3.mp4
ERROR loading video: /usr/local/share/attract/intro/intro_4x3.mp4
Error opening input file: /usr/local/share/attract/intro/intro.mp4
ERROR loading video: /usr/local/share/attract/intro/intro.mp4
1.33333 using settings[4x3][aspectDepend][res_x] : 1600
using settings[4x3][aspectDepend][res_y] : 1200
using settings[4x3][aspectDepend][maskFactor] : 1.6
using settings[4x3][aspectDepend][snap_skewX] : 62.5
using settings[4x3][aspectDepend][snap_skewY] : -12.9
using settings[4x3][aspectDepend][snap_pinchX] : 0
using settings[4x3][aspectDepend][snap_pinchY] : 40
using settings[4x3][aspectDepend][snap_rotation] : 1
using settings[4x3][aspectDepend][snap_skewX] : 62.5
using settings[4x3][aspectDepend][snap_skewY] : -12.9
using settings[4x3][aspectDepend][snap_pinchX] : 0
using settings[4x3][aspectDepend][snap_pinchY] : 40
using settings[4x3][aspectDepend][snap_rotation] : 1
using settings[4x3][aspectDepend][snap_skewX] : 62.5
using settings[4x3][aspectDepend][snap_skewY] : -12.9
using settings[4x3][aspectDepend][snap_pinchX] : 0
using settings[4x3][aspectDepend][snap_pinchY] : 40
using settings[4x3][aspectDepend][snap_rotation] : 1
settings[4x3][aspectDepend][marquee_skewX] does not exist
using default value: 17
settings[4x3][aspectDepend][marquee_skewY] does not exist
using default value: 0
settings[4x3][aspectDepend][marquee_pinchX] does not exist
using default value: -2
settings[4x3][aspectDepend][marquee_pinchY] does not exist
using default value: 7
settings[4x3][aspectDepend][marquee_rotation] does not exist
using default value: 6.2
settings[4x3][aspectDepend][marquee_skewX] does not exist
using default value: 17
settings[4x3][aspectDepend][marquee_skewY] does not exist
using default value: 0
settings[4x3][aspectDepend][marquee_pinchX] does not exist
using default value: -2
settings[4x3][aspectDepend][marquee_pinchY] does not exist
using default value: 7
settings[4x3][aspectDepend][marquee_rotation] does not exist
using default value: 6.2
using settings[4x3][aspectDepend][wheelNumElements] : 10
 - Loaded layout: /home/robee/.attract/layouts/nevato/ (layout.nut)
*** Running: /home/mame/groovymame -v gryzor1
SwitchRes: v0.016_final, Monitor: lcd, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Using default vfreq range for LCD 59.000000-61.000000
SwitchRes: Found output connector 'DVI-I-1'
SwitchRes: Creating automatic specs for LCD based on VESA GTF
SwitchRes: Monitor range 73278.00-75762.00,59.00-61.00,0.696,1.044,1.740,0.013,0.040,0.510,0,1,1200,1200,0,0
SwitchRes: -resolution was set at command line or in .ini file as 1600x1200@60

SwitchRes: Entering switchres_modeline_setup
SwitchRes: v0.016_final:[gryzor1] Calculating best video mode for 224x280@60.000000 orientation: rotated

SwitchRes: [1600]x[1200]_(60=60.000000Hz)
   rng(0): 1600 x1200_60.000000p 74.520000 [integ] scale(4, 4, 1) diff(0.44, 8.05, 0.0000) ratio(7.143, 4.286)

SwitchRes: [gryzor1] (1) vertical (224x280@60.000000)->(1600x1200@60.000000)
   rng(0): 1600 x1200_60.000000p 74.520000 [integ] scale(4, 4, 1) diff(0.44, 8.05, 0.0000) ratio(7.143, 4.286)
SwitchRes: Modeline "1600x1200_60 74.520000KHz 60.000000Hz" 160.963200 1600 1712 1880 2160 1200 1201 1204 1242   -hsync +vsync
SwitchRes: Running 'xrandr  --newmode "1600x1200_60.000000" 160.963200 1600 1712 1880 2160 1200 1201 1204 1242   -hsync +vsync'
SwitchRes: Running 'xrandr  --addmode DVI-I-1 "1600x1200_60.000000"'
SwitchRes: Running 'xrandr  --output DVI-I-1 --mode "1600x1200_60.000000"'
SwitchRes: Setting option -rotate
SwitchRes: Setting option -noror
SwitchRes: Setting option -noautoror
SwitchRes: Setting option -norol
SwitchRes: Setting option -noautorol
SwitchRes: Setting option -keepaspect
SwitchRes: Setting option -nounevenstretch
SwitchRes: Setting option -nounevenstretchx
SwitchRes: Setting option -noblack_frame_insertion
SwitchRes: Setting option -nosyncrefresh
SwitchRes: Setting option -nowaitvsync
SwitchRes: Setting option -nofilter
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
Display #0
Renderdrivers:
    opengl (0x0)
opengles2 (0x0)
  opengles (0x0)
  software (0x0)
Available audio drivers:
pulseaudio         
alsa               
dsp                 
disk               
dummy               
Build version:      0.182 (unknown)
Build architecure: 
Build defines 1:    SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1:    LSB_FIRST=1 PTR64=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=6 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="6.2.1 20160830"
Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (1600 x 1200)
Leave init_monitors
Enter sdlwindow_init
Using SDL multi-window OpenGL driver (SDL 2.0+)
/dev/dri/card0 successfully opened

Hints:
SDL_FRAMEBUFFER_ACCELERATION             (null)
SDL_RENDER_DRIVER                        (null)
SDL_RENDER_OPENGL_SHADERS                (null)
SDL_RENDER_SCALE_QUALITY                 (null)
SDL_RENDER_VSYNC                         (null)
SDL_VIDEO_X11_XVIDMODE                   (null)
SDL_VIDEO_X11_XINERAMA                   (null)
SDL_VIDEO_X11_XRANDR                     (null)
SDL_GRAB_KEYBOARD                        (null)
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS         (null)
SDL_IOS_IDLE_TIMER_DISABLED              (null)
SDL_IOS_ORIENTATIONS                     (null)
SDL_XINPUT_ENABLED                       (null)
SDL_GAMECONTROLLERCONFIG                 (null)
SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS     (null)
SDL_ALLOW_TOPMOST                        (null)
SDL_TIMER_RESOLUTION                     (null)
SDL_RENDER_DIRECT3D_THREADSAFE           (null)
SDL_VIDEO_ALLOW_SCREENSAVER              (null)
SDL_ACCELEROMETER_AS_JOYSTICK            (null)
SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK   (null)
SDL_VIDEO_WIN_D3DCOMPILER                (null)
SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT      (null)
SDL_VIDEO_MAC_FULLSCREEN_SPACES          (null)
SDL_MOUSE_RELATIVE_MODE_WARP             (null)
SDL_RENDER_DIRECT3D11_DEBUG              (null)
SDL_VIDEO_HIGHDPI_DISABLED               (null)
SDL_WINRT_PRIVACY_POLICY_URL             (null)
SDL_WINRT_PRIVACY_POLICY_LABEL           (null)
SDL_WINRT_HANDLE_BACK_BUTTON             (null)
Leave sdlwindow_init
unzip: opened archive file artwork/contra.zip
unzip: found artwork/contra.zip ECD
unzip: artwork/contra.zip has no ZIP64 ECD locator
unzip: read artwork/contra.zip central directory
unzip: closing archive file artwork/contra.zip and sending to cache
unzip: found artwork/contra.zip in cache
unzip: opened archive file artwork/contra.zip
unzip: closing archive file artwork/contra.zip and sending to cache
Enter sdl_info::create
OpenGL: nouveau
OpenGL: Gallium 0.4 on NVC8
OpenGL: 3.0 Mesa 13.0.2
OpenGL: texture rectangle supported
OpenGL: non-power-of-2 textures supported (new method)
OpenGL: vertex buffer supported
OpenGL: pixel buffers supported
OpenGL: framebuffer object supported
OpenGL: GLSL supported, but disabled
OpenGL: max texture size 16384 x 16384
Leave renderer_ogl::create
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
PortAudio: API ALSA has 11 devices
PortAudio: ALSA: "HDA Intel: ALC888 Analog (hw:0,0)"
PortAudio: ALSA: "HDA Intel: ALC888 Digital (hw:0,1)" (default)
PortAudio: ALSA: "HDA Intel: ALC888 Alt Analog (hw:0,2)"
PortAudio: ALSA: "HDA NVidia: HDMI 0 (hw:1,3)"
PortAudio: ALSA: "HDA NVidia: HDMI 0 (hw:1,7)"
PortAudio: ALSA: "HDA NVidia: HDMI 0 (hw:1,8)"
PortAudio: ALSA: "HDA NVidia: HDMI 0 (hw:1,9)"
PortAudio: ALSA: "sysdefault"
PortAudio: ALSA: "iec958"
PortAudio: ALSA: "spdif"
PortAudio: ALSA: "default"
PortAudio: API OSS has 0 devices
PortAudio: Unable to find specified API or device or none set, reverting to default
PortAudio: Using device "HDA Intel: ALC888 Digital (hw:0,1)" on API "ALSA"
PortAudio: Sample rate is 48000 Hz, device output latency is 5.75 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames
Keyboard: Start initialization
Input: Adding keyboard #0: System keyboard (device id: System keyboard)
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding mouse #0: System mouse (device id: System mouse)
Mouse: Registered System mouse
Mouse: End initialization
Joystick: Start initialization
Input: Adding joystick #0: UltimarcIPAC2UltimarcIPAC2 (device id: UltimarcIPAC2UltimarcIPAC2)
Joystick: Ultimarc IPAC 2 Ultimarc IPAC 2
Joystick:   ...  4 axes, 32 buttons 1 hats 0 balls
Joystick:   ...  Physical id 0 mapped to logical id 1
Joystick: End initialization
unzip: found artwork/contra.zip in cache
unzip: closing archive file artwork/contra.zip and sending to cache
unzip: found artwork/contra.zip in cache
unzip: opened archive file artwork/contra.zip
unzip: closing archive file artwork/contra.zip and sending to cache
OpenGL: VBO supported
OpenGL: PBO supported
OpenGL: FBO supported
OpenGL: using vid filter: 0
Region ':maincpu' created
unzip: opened archive file roms/gryzor1.zip
unzip: found roms/gryzor1.zip ECD
unzip: roms/gryzor1.zip has no ZIP64 ECD locator
unzip: read roms/gryzor1.zip central directory
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: opened archive file roms/gryzor1.zip
unzip: closing archive file roms/gryzor1.zip and sending to cache
Region ':audiocpu' created
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: opened archive file roms/contra.zip
unzip: found roms/contra.zip ECD
unzip: roms/contra.zip has no ZIP64 ECD locator
unzip: read roms/contra.zip central directory
unzip: closing archive file roms/contra.zip and sending to cache
Region ':gfx1' created
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
Region ':gfx2' created
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
Region ':proms' created
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: opened archive file roms/contra.zip
unzip: closing archive file roms/contra.zip and sending to cache
Region ':pals' created
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
unzip: found roms/contra.zip in cache
unzip: closing archive file roms/contra.zip and sending to cache
unzip: found roms/gryzor1.zip in cache
unzip: closing archive file roms/gryzor1.zip and sending to cache
007766.20d.bin NOT FOUND (NO GOOD DUMP KNOWN) (tried in gryzor1 contra gryzor1)
WARNING: the machine might not run correctly.
Starting Gryzor (set 2) ':'
  (missing dependencies; rescheduling)
Starting HD6309 ':maincpu'
Starting M6809 ':audiocpu'
Starting Video Screen ':screen'
  (missing dependencies; rescheduling)
Starting gfxdecode ':gfxdecode'
Starting palette ':palette'
Starting K007121 Sprite/Tilemap Controller ':k007121_1'
Starting K007121 Sprite/Tilemap Controller ':k007121_2'
Starting Speaker ':lspeaker'
  (missing dependencies; rescheduling)
Starting Speaker ':rspeaker'
  (missing dependencies; rescheduling)
Starting Generic 8-bit latch ':soundlatch'
Starting YM2151 ':ymsnd'
Starting Gryzor (set 2) ':'
  (missing dependencies; rescheduling)
Starting Video Screen ':screen'
Starting Speaker ':lspeaker'
Starting Speaker ':rspeaker'
Starting Gryzor (set 2) ':'
Starting Gryzor (set 2)
hiscore: found hiscore.dat entry for gryzor1
Searching font Liberation Sans in -. path/s
font Liberation Sans|Regular is not TrueType or BDF, using MAME default
GL texture: copy 1, shader 0, dynamic 1, 280x224 280x224 [PALETTE16, Equal: 0, Palette: 1,
            scale 1x1, border 0, pitch 296,280/16384], bytes/pix 4
GL texture: copy 1, shader 0, dynamic 1, 280x224 280x224 [PALETTE16, Equal: 0, Palette: 1,
            scale 1x1, border 0, pitch 296,280/16384], bytes/pix 4
hiscore: scores read
Average speed: 99.52% (9 seconds)
Sound: overflows=5 underflows=8
Enter sdlwindow_exit
Leave sdlwindow_exit
SwitchRes: Restoring desktop resolution: 1600x1200
SwitchRes: Running 'xrandr --output DVI-I-1 --mode 1600x1200'
SwitchRes: Running 'xrandr  --delmode DVI-I-1 "1600x1200_60.000000"'
SwitchRes: Running 'xrandr  --rmmode "1600x1200_60.000000"'

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #55 on: February 02, 2017, 12:51:44 am »
works fine when launched directly or when launched from AM with alsa as the device rather than pulseaudio:

Thanks for posting. My guess is that pulseaudio hogs the ALSA device. When using AM with ALSA, dmix is probably used to mix the audio stream from AM with the one from MAME. We've seen the same thing on Windows with exclusive access, the audio device needs to be released before launching MAME.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5523
Re: Is GroovyMame + ASIO still a thing?
« Reply #56 on: February 02, 2017, 07:18:33 am »
it's time for some measurements!

Awesome!

I've been comparing this agaisnt the old test you did with ASIO (on the link your posted). Is it a statistical issue due to picking specific samples or does it actually show an improvement even over the ASIO build? I mean, your current results (68 ms) are better than what you got with ASIO (74-88 ms).
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

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #57 on: February 02, 2017, 01:14:41 pm »
Awesome!

I've been comparing this agaisnt the old test you did with ASIO (on the link your posted). Is it a statistical issue due to picking specific samples or does it actually show an improvement even over the ASIO build? I mean, your current results (68 ms) are better than what you got with ASIO (74-88 ms).

I redid the old ASIO test in the exact same way with WDM-KS, and the results are better, I *think* frame_delay was disabled with the old tests (there was some issues with ASIO+FD right at the beginning), which would account for the difference. So yes, the result we get today is definitely better!

Code: [Select]
>> pbobble_wdmks = [ 68.2, 79.6, 77, 88, 81.6, 88.4, 69.4, 68.4, 75.4, 79.6, 74.2, 81.0, 91, 90.4, 76.2, 88.6, 89.2, 76.8, 91.8, 81.2, 85, 79, 86, 78.4, 76.2 ];
>> mean(pbobble_wdmks)

ans =

   80.8240

>> min(pbobble_wdmks)

ans =

   68.2000

>> max(pbobble_wdmks)

ans =

   91.8000

>>

Also, the reason for the spread is USB poll rate granularity (10 ms), and frame timing (16.67 ms). Max-min is 23.6 ms, so this lines up pretty well.

I also tried the NES driver, and that gives about 30 ms best-case latency with the 240p test suite, and sfiii3u gives about 50 ms, which is just sooo nice.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Is GroovyMame + ASIO still a thing?
« Reply #58 on: February 04, 2017, 02:33:01 pm »
How do you get WDM-KS working? GM is telling me that it cannot find the device. I'm using HDMI audio

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #59 on: February 04, 2017, 02:48:50 pm »
How do you get WDM-KS working? GM is telling me that it cannot find the device. I'm using HDMI audio

Hi, WDM-KS (and WASAPI under most conditions) need exclusive access to the audio device. This means that if you have any other application using the device, WDM-KS cannot take exclusive control over it. What you need to do is to make sure that the audio device is free, which usually means closing every other application that could be using it. This includes web browsers. If this doesn't work, restart your computer and try again. If you still cannot get it working, please post a reply here with a log attached.

strontium

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
Re: Is GroovyMame + ASIO still a thing?
« Reply #60 on: February 07, 2017, 06:11:46 am »
Hi guys, just a quick question regarding portaudio working on a linux setup (groovyarcade or a custom build) is there anything that needs to be done in order to get this to work apart from setting the mame.ini variables sound portaudio and audio_latency 1.0.

The reason I ask is that I have done the above and configured this in mame.ini but have seen the following problems, the game loads and the sound is present but will randomly mute or just stop playing audio while I am playing a game.

I'm not sure if this is a random mute or the audio system crashing. I will try and get a log when I get home but if I leave sound as auto I don't see any of this strange behaviour.

I just thought I would highlight and see if any one else had experienced these issues?

And if any experienced Linux users have done anything specific with configuring ALSA or installing additional libraries to support this new sound subsystem.

Thanks

Strontium
« Last Edit: February 07, 2017, 06:14:21 am by strontium »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #61 on: February 07, 2017, 09:05:45 am »
The reason I ask is that I have done the above and configured this in mame.ini but have seen the following problems, the game loads and the sound is present but will randomly mute or just stop playing audio while I am playing a game.

Please provide a log, also please specify GM version, Linux version, CPU/motherboard, and if you're using 32 or 64 bit binaries. If I am to have a chance to reproduce this, this information is critical.

My current guess though is that the pa_latency parameter might need an increase for your setup.

Edit: I tried reproducing this on Fedora 25 (mainline MAME, x64) on a HP 2540p laptop, without success. I recorded eight hours of audio (wrally), and wrote a small script to find gaps of silence in it. The longest gap was about 40 ms, which is probably just random OS jitter.
« Last Edit: February 08, 2017, 03:57:09 am by intealls »

strontium

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
Re: Is GroovyMame + ASIO still a thing?
« Reply #62 on: February 07, 2017, 09:35:12 am »
Please provide a log, also please specify GM version, Linux version, CPU/motherboard, and if you're using 32 or 64 bit binaries. If I am to have a chance to reproduce this, this information is critical.

My current guess though is that the pa_latency parameter might need an increase for your setup.

Will do all the above this weekend intealls as I'm not back home till Saturday. I understand that without this there is not a lot that can be done. I'll post up here when I have the required information.

Thanks

Strontium

strontium

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
Re: Is GroovyMame + ASIO still a thing?
« Reply #63 on: February 12, 2017, 09:47:21 am »
Hey intealls,

Apologies it's took till now to get the information you asked for,

Groovymame: 1.82
Switchres 0.016
CPU: Intel Haswell Pentium G3258
Motherboard: Intel Gigabyte H81M-S2H
64 Bit

Please find my log below:

Code: [Select]
SwitchRes: v0.016_final, Monitor: polo, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Monitor range 15625.00-16670.00,49.50-65.00,2.000,4.700,8.000,0.064,0.160,1.056,0,0,192,288,448,576
SwitchRes: xrandr version 1.5
SwitchRes: Found output connector 'DVI-0'

SwitchRes: Entering switchres_modeline_setup
SwitchRes: v0.016_final:[rtype.7z] Calculating best video mode for 384x256@55.017605 orientation: normal

SwitchRes: (   1)x(   1)_(60=60.000000Hz)
   rng(0):  384 x 256_55.017605p 15.625000 [integ] scale(1, 1, 1) diff(0.00, 0.00, 0.0000) ratio(1.000, 1.000)

SwitchRes: [rtype.7z] (1) horizontal (384x256@55.017605)->(384x256@55.017605)
   rng(0):  384 x 256_55.017605p 15.625000 [integ] scale(1, 1, 1) diff(0.00, 0.00, 0.0000) ratio(1.000, 1.000)
SwitchRes: Modeline "384x256_60 15.625000KHz 55.017605Hz" 7.874999 384 400 440 504 256 261 263 284   -hsync -vsync
----- CRTC 0: mode 0x55, 648x480+0+0.
+++++ CRTC 0: mode 0x49e, 384x256+0+0.
Switchres: xrandr mode (GM-384x256_55.017605) (0x49e) 7.874999MHz
SwitchRes: Setting option -rotate
SwitchRes: Setting option -noror
SwitchRes: Setting option -autoror
SwitchRes: Setting option -norol
SwitchRes: Setting option -noautorol
SwitchRes: Setting option -keepaspect
SwitchRes: Setting option -nounevenstretch
SwitchRes: Setting option -nounevenstretchx
SwitchRes: Setting option -noblack_frame_insertion
SwitchRes: Setting option -nosyncrefresh
SwitchRes: Setting option -nowaitvsync
SwitchRes: Setting option -nofilter
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
        Display #0
                Renderdrivers:
                            opengl (0x0)
                         opengles2 (0x0)
                          opengles (0x0)
                          software (0x0)
Available audio drivers:
        pulseaudio
        alsa
        dsp
        disk
        dummy
Build version:      0.182 (unknown)
Build architecure:
Build defines 1:    SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1:    LSB_FIRST=1 PTR64=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=6 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=1 __VERSION__="6.3.1 20170109"
Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (384 x 256)
Leave init_monitors
Enter sdlwindow_init
Using SDL multi-window soft driver (SDL 2.0+)

Hints:
        SDL_FRAMEBUFFER_ACCELERATION             (null)
        SDL_RENDER_DRIVER                        (null)
        SDL_RENDER_OPENGL_SHADERS                (null)
        SDL_RENDER_SCALE_QUALITY                 (null)
        SDL_RENDER_VSYNC                         (null)
        SDL_VIDEO_X11_XVIDMODE                   (null)
        SDL_VIDEO_X11_XINERAMA                   (null)
        SDL_VIDEO_X11_XRANDR                     (null)
        SDL_GRAB_KEYBOARD                        (null)
        SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS         (null)
        SDL_IOS_IDLE_TIMER_DISABLED              (null)
        SDL_IOS_ORIENTATIONS                     (null)
        SDL_XINPUT_ENABLED                       (null)
        SDL_GAMECONTROLLERCONFIG                 (null)
        SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS     (null)
        SDL_ALLOW_TOPMOST                        (null)
        SDL_TIMER_RESOLUTION                     (null)
        SDL_RENDER_DIRECT3D_THREADSAFE           (null)
        SDL_VIDEO_ALLOW_SCREENSAVER              (null)
        SDL_ACCELEROMETER_AS_JOYSTICK            (null)
        SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK   (null)
        SDL_VIDEO_WIN_D3DCOMPILER                (null)
        SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT      (null)
        SDL_VIDEO_MAC_FULLSCREEN_SPACES          (null)
        SDL_MOUSE_RELATIVE_MODE_WARP             (null)
        SDL_RENDER_DIRECT3D11_DEBUG              (null)
        SDL_VIDEO_HIGHDPI_DISABLED               (null)
        SDL_WINRT_PRIVACY_POLICY_URL             (null)
        SDL_WINRT_PRIVACY_POLICY_LABEL           (null)
        SDL_WINRT_HANDLE_BACK_BUTTON             (null)
Leave sdlwindow_init
Enter sdl_info::create
window: using renderer opengl
renderer: flag SDL_RENDERER_ACCELERATED
Leave renderer_sdl2::create
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
PortAudio: API ALSA has 10 devices
PortAudio: ALSA: "HDA Intel PCH: ALC887-VD Analog (hw:0,0)"
PortAudio: ALSA: "HDA Intel PCH: ALC887-VD Alt Analog (hw:0,2)"
PortAudio: ALSA: "HDA ATI HDMI: 0 (hw:1,3)"
PortAudio: ALSA: "sysdefault"
PortAudio: ALSA: "front"
PortAudio: ALSA: "surround40"
PortAudio: ALSA: "surround51"
PortAudio: ALSA: "surround71"
PortAudio: ALSA: "default" (default)
PortAudio: ALSA: "dmix"
PortAudio: API OSS has 0 devices
PortAudio: Unable to find specified API or device or none set, reverting to default
PortAudio: Using device "default" on API "ALSA"
PortAudio: Sample rate is 48000 Hz, device output latency is 21.33 ms
PortAudio: Allowed additional buffering latency is 20.00 ms/960 frames
Keyboard: Start initialization
Input: Adding keyboard #0: System keyboard (device id: System keyboard)
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding mouse #0: System mouse (device id: System mouse)
Mouse: Registered System mouse
Mouse: End initialization
Joystick: Start initialization
Joystick: End initialization
Region ':maincpu' created
un7z: opened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Region ':sprites' created
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Region ':gfx2' created
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Region ':gfx3' created
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Starting R-Type (World) ':'
Optional I/O port ':JumperJ3' not found
Optional shared pointer ':spriteram2' not found
Optional shared pointer ':majtitle_rowscr' not found
Optional device ':dac' not found
Optional device ':mcu' not found
  (missing dependencies; rescheduling)
Starting V30 ':maincpu'
Starting Z80 ':soundcpu'
Starting 8259 PIC ':upd71059c'
Starting gfxdecode ':gfxdecode'
Starting palette ':palette'
Starting Video Screen ':screen'
Starting Speaker ':speaker'
  (missing dependencies; rescheduling)
Starting Generic 8-bit latch ':soundlatch'
Starting Irem M72 Audio Custom ':m72'
Optional device ':dac' not found
Optional memory region ':samples' not found
Starting YM2151 ':ymsnd'
Starting R-Type (World) ':'
Optional I/O port ':JumperJ3' not found
Optional shared pointer ':spriteram2' not found
Optional shared pointer ':majtitle_rowscr' not found
Optional device ':dac' not found
Optional device ':mcu' not found
  (missing dependencies; rescheduling)
Starting Speaker ':speaker'
Starting R-Type (World) ':'
Optional I/O port ':JumperJ3' not found
Optional shared pointer ':spriteram2' not found
Optional shared pointer ':majtitle_rowscr' not found
Optional device ':dac' not found
Optional device ':mcu' not found
Starting R-Type (World)
hiscore: found hiscore.dat entry for rtype
Searching font Liberation Sans in -/home/roms/mame/fonts path/s
font Liberation Sans|Regular is not TrueType or BDF, using MAME default
hiscore: scores read
Average speed: 99.82% (115 seconds)
Sound: overflows=6 underflows=30
Enter sdlwindow_exit
Leave sdlwindow_exit
SwitchRes: Restoring desktop resolution:
SwitchRes: xrandr original video mode restored.

Just an update, I think your right about the issue being related to the pa_latency setting. The reason I say this is that my config was missing the following three settings when I got home and checked: pa_api, pa_device, and pa_latency. I presume it uses default vaules with these not being in the ini.

So I added the following to my mame.ini

#
# PORTAUDIO OPTIONS
#
pa_api                    none
pa_device                 none
pa_latency                0

But this still caused the sound to drop out at random times, I also noticed that pausing and unpausing the emulation would cause the issue to present itself. Also pausing and leaving for say a couple of minutes make a cup of tea and unpause would start the emulation but with no sound present.

So I increased the pa_latency to 0.025 and this seems to have made the whole thing a little more stable.

My question is this regarding linux and groovymame. The pa_latency setting is clearly important in regards to stability etc.. But I can't seem to see any solid documentation on what it does and advice on setting this variable to the optimum value to get the best performance out of the system.

Is it literally done by just trial and error? Or do you have any suggestions from using logging etc.. Looking at the log in order to choose the best setting for each particular setup.

I've noticed these lines in the logs:

PortAudio: Allowed additional buffering latency is 20.00 ms/960 frames
and
PortAudio: Sample rate is 48000 Hz, device output latency is 21.33 ms
and
Sound: overflows=5 underflows=8

Do these feed into any approach for this setting and getting it to stop dropping out.

Finally what would the system use for default if this was left blank like my original mame.ini was? 0 for pa_latency?

I know that's a lot of questions but with such a great advancement in latency and sound I think this needs to be understood in greater detail.

Thanks again for your great work and help

Strontium

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #64 on: February 12, 2017, 11:17:42 am »
But this still caused the sound to drop out at random times, I also noticed that pausing and unpausing the emulation would cause the issue to present itself.

Thanks for reporting. Before we do anything else, a nasty bug found its way into the base implementation of 0.182, which doesn't affect the 64-bit Windows builds, but might affect the build you're using. The 8 hour test run I did was done with this fix applied.

Are you able to build from source? It's fixed in master, otherwise I can put together a build you could try.

Also, what Linux distribution are you using? Are you using the Linux GM builds found in the main thread?
« Last Edit: February 12, 2017, 11:40:56 am by intealls »

strontium

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
Re: Is GroovyMame + ASIO still a thing?
« Reply #65 on: February 12, 2017, 12:49:29 pm »
Hi, no problem. The build I am using is compiled from official source plus the groovymame diff so should be fine. I built it myself.

I'm using the latest GroovyArcade builds that Ves put out. They are basically Arch Linux. So a version of Arch linux should allow you to troubleshoot just fine or just a VM running the last Groovyarcade ISO with the latest GroovyMame 182 installed. The kernel version is 4.6.3-1 if that helps too.

Hope that helps, if there is anything else I can do to help let me know.

Thanks,

Strontium
« Last Edit: February 12, 2017, 12:53:06 pm by strontium »

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #66 on: February 12, 2017, 01:32:01 pm »
Ok, perfect. Could you apply this diff and see if it still misbehaves?

https://patch-diff.githubusercontent.com/raw/mamedev/mame/pull/2028.diff

ozfalcon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • ZSystem
Re: Is GroovyMame + ASIO still a thing?
« Reply #67 on: February 12, 2017, 06:26:29 pm »
But this still caused the sound to drop out at random times, I also noticed that pausing and unpausing the emulation would cause the issue to present itself.

Thanks for reporting. Before we do anything else, a nasty bug found its way into the base implementation of 0.182, which doesn't affect the 64-bit Windows builds, but might affect the build you're using. The 8 hour test run I did was done with this fix applied.

Are you able to build from source? It's fixed in master, otherwise I can put together a build you could try.

Also, what Linux distribution are you using? Are you using the Linux GM builds found in the main thread?

What was the commit (link) to fix this bug, I'm curious to see.


intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #68 on: February 13, 2017, 02:58:10 am »
What was the commit (link) to fix this bug, I'm curious to see.

Writes outside of the allocated memory space => anything can happen.

Anyway, I tried the latest GroovyArcade LiveCD with the linux binary (final_linux.etc.tar.bz without the xrandr library update) from the Google Drive, and it doesn't seem to affect my HP 2540p at least. I let it run for an hour or so and tried pausing/unpausing, without issues.

strontium

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
Re: Is GroovyMame + ASIO still a thing?
« Reply #69 on: February 13, 2017, 05:20:48 am »
Hey Intealls,

Just an update, I recompiled mame from source with your diff and the 0.182 groovymame diff and I'm sorry to say I was still getting the sound drop out using this test. Just to confirm the behauviour.

It can drop out at any random time 1min - 30 mins +
Pausing / Unpausing causes the behaviour to present itself easier (not fast pause / unpause ) more pause and leave for a couple of mins but fast can do it too.

When I loose the sound it's gone nothing brings it back only exiting the game and restarting.

Another observation is that when I exit a game with the sound gone it takes a long time to exit.

Finally I have found that if I change the pa_latency to a value above 0 this behaviour becomes a lot less (more stable) I am using a value of 0.05 at the moment and that seems to be generally OK.

This of course could be localised to my setup so I don't want to vocalise it too much. I'll keep observing and of course if you want any further input let me know.

Thanks

Strontium

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #70 on: February 13, 2017, 06:25:06 am »
Ok, thanks for testing and reporting. With that out of the way, I must reproduce this locally to have a chance to find out what might be happening. I did a 22 hour test run on Windows with the 32-bit binary, without issue as well.

I have a similar setup to yours I can use for tests (Gigabyte Z97 motherboard instead of H81), also, for completeness, could you tell me what compiler version you're using (I assume you're building on Groovy Arch as well)?

When I loose the sound it's gone nothing brings it back only exiting the game and restarting.

Another observation is that when I exit a game with the sound gone it takes a long time to exit.

Finally I have found that if I change the pa_latency to a value above 0 this behaviour becomes a lot less (more stable) I am using a value of 0.05 at the moment and that seems to be generally OK.

All of this information is very valuable, so if you think of anything else, let me know. Also if you find a way to reproduce it consistently that would be very helpful.

Edit: Also, you could try setting -pa_device "HDA Intel PCH: ALC887-VD Analog (hw:0,0)", -pa_device "HDA Intel PCH: ALC887-VD Alt Analog (hw:0,2)" or -pa_device "dmix" and see if that makes any difference.
« Last Edit: February 13, 2017, 06:27:24 am by intealls »

strontium

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
Re: Is GroovyMame + ASIO still a thing?
« Reply #71 on: February 13, 2017, 07:38:34 am »
Hey, a quick update. I think I've got it working or from the tests I have just done following your advice it seems / appears to be a lot more stable.

So this is what I changed in the mame.ini

pa_api ALSA (was set to none)
pa_device "HDA Intel PCH: ALC887-VD Analog (hw:0,0)" (was set to default)
pa_latency 0 (was set to 0.05)

The output from the log is different now too and acknowledges those hard coded choices. I've also noticed that the load time has increased I guess as it's not having to timeout and look for things it's just using what it's been told to use. I'm not talking anything massive but when watching the log output if moves along very fast compared to when those values were their original value.

Log Output:
Code: [Select]
SwitchRes: v0.016_final, Monitor: polo, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Monitor range 15625.00-16670.00,49.50-65.00,2.000,4.700,8.000,0.064,0.160,1.056,0,0,192,288,448,576
SwitchRes: xrandr version 1.5
SwitchRes: Found output connector 'DVI-0'

SwitchRes: Entering switchres_modeline_setup
SwitchRes: v0.016_final:[rtype.7z] Calculating best video mode for 384x256@55.017605 orientation: normal

SwitchRes: (   1)x(   1)_(60=60.000000Hz)
   rng(0):  384 x 256_55.017605p 15.625000 [integ] scale(1, 1, 1) diff(0.00, 0.00, 0.0000) ratio(1.000, 1.000)

SwitchRes: [rtype.7z] (1) horizontal (384x256@55.017605)->(384x256@55.017605)
   rng(0):  384 x 256_55.017605p 15.625000 [integ] scale(1, 1, 1) diff(0.00, 0.00, 0.0000) ratio(1.000, 1.000)
SwitchRes: Modeline "384x256_60 15.625000KHz 55.017605Hz" 7.874999 384 400 440 504 256 261 263 284   -hsync -vsync
----- CRTC 0: mode 0x55, 648x480+0+0.
+++++ CRTC 0: mode 0x49d, 384x256+0+0.
Switchres: xrandr mode (GM-384x256_55.017605) (0x49d) 7.874999MHz
SwitchRes: Setting option -rotate
SwitchRes: Setting option -noror
SwitchRes: Setting option -autoror
SwitchRes: Setting option -norol
SwitchRes: Setting option -noautorol
SwitchRes: Setting option -keepaspect
SwitchRes: Setting option -nounevenstretch
SwitchRes: Setting option -nounevenstretchx
SwitchRes: Setting option -noblack_frame_insertion
SwitchRes: Setting option -syncrefresh
SwitchRes: Setting option -waitvsync
SwitchRes: Setting option -nofilter
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
        Display #0
                Renderdrivers:
                            opengl (0x0)
                         opengles2 (0x0)
                          opengles (0x0)
                          software (0x0)
Available audio drivers:
        pulseaudio
        alsa
        dsp
        disk
        dummy
Build version:      0.182 (unknown)
Build architecure:
Build defines 1:    SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1:    LSB_FIRST=1 PTR64=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=6 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=1 __VERSION__="6.3.1 20170109"
Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (384 x 256)
Leave init_monitors
Enter sdlwindow_init
Using SDL multi-window soft driver (SDL 2.0+)

Hints:
        SDL_FRAMEBUFFER_ACCELERATION             (null)
        SDL_RENDER_DRIVER                        (null)
        SDL_RENDER_OPENGL_SHADERS                (null)
        SDL_RENDER_SCALE_QUALITY                 (null)
        SDL_RENDER_VSYNC                         (null)
        SDL_VIDEO_X11_XVIDMODE                   (null)
        SDL_VIDEO_X11_XINERAMA                   (null)
        SDL_VIDEO_X11_XRANDR                     (null)
        SDL_GRAB_KEYBOARD                        (null)
        SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS         (null)
        SDL_IOS_IDLE_TIMER_DISABLED              (null)
        SDL_IOS_ORIENTATIONS                     (null)
        SDL_XINPUT_ENABLED                       (null)
        SDL_GAMECONTROLLERCONFIG                 (null)
        SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS     (null)
        SDL_ALLOW_TOPMOST                        (null)
        SDL_TIMER_RESOLUTION                     (null)
        SDL_RENDER_DIRECT3D_THREADSAFE           (null)
        SDL_VIDEO_ALLOW_SCREENSAVER              (null)
        SDL_ACCELEROMETER_AS_JOYSTICK            (null)
        SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK   (null)
        SDL_VIDEO_WIN_D3DCOMPILER                (null)
        SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT      (null)
        SDL_VIDEO_MAC_FULLSCREEN_SPACES          (null)
        SDL_MOUSE_RELATIVE_MODE_WARP             (null)
        SDL_RENDER_DIRECT3D11_DEBUG              (null)
        SDL_VIDEO_HIGHDPI_DISABLED               (null)
        SDL_WINRT_PRIVACY_POLICY_URL             (null)
        SDL_WINRT_PRIVACY_POLICY_LABEL           (null)
        SDL_WINRT_HANDLE_BACK_BUTTON             (null)
Leave sdlwindow_init
Enter sdl_info::create
window: using renderer opengl
renderer: flag SDL_RENDERER_PRESENTVSYNC
renderer: flag SDL_RENDERER_ACCELERATED
Leave renderer_sdl2::create
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
PortAudio: API ALSA has 10 devices
PortAudio: ALSA: "HDA Intel PCH: ALC887-VD Analog (hw:0,0)"
PortAudio: ALSA: "HDA Intel PCH: ALC887-VD Alt Analog (hw:0,2)"
PortAudio: ALSA: "HDA ATI HDMI: 0 (hw:1,3)"
PortAudio: ALSA: "sysdefault"
PortAudio: ALSA: "front"
PortAudio: ALSA: "surround40"
PortAudio: ALSA: "surround51"
PortAudio: ALSA: "surround71"
PortAudio: ALSA: "default" (default)
PortAudio: ALSA: "dmix"
PortAudio: API OSS has 0 devices
PortAudio: Using device "HDA Intel PCH: ALC887-VD Analog (hw:0,0)" on API "ALSA"
PortAudio: Sample rate is 48000 Hz, device output latency is 5.75 ms
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames
Keyboard: Start initialization
Input: Adding keyboard #0: System keyboard (device id: System keyboard)
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding mouse #0: System mouse (device id: System mouse)
Mouse: Registered System mouse
Mouse: End initialization
Joystick: Start initialization
Joystick: End initialization
Region ':maincpu' created
un7z: opened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Region ':sprites' created
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Region ':gfx2' created
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Region ':gfx3' created
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
un7z: found /home/roms/mame/roms/rtype.7z in cache
un7z: reopened archive file /home/roms/mame/roms/rtype.7z
un7z: closing archive file /home/roms/mame/roms/rtype.7z and sending to cache
Starting R-Type (World) ':'
Optional I/O port ':JumperJ3' not found
Optional shared pointer ':spriteram2' not found
Optional shared pointer ':majtitle_rowscr' not found
Optional device ':dac' not found
Optional device ':mcu' not found
  (missing dependencies; rescheduling)
Starting V30 ':maincpu'
Starting Z80 ':soundcpu'
Starting 8259 PIC ':upd71059c'
Starting gfxdecode ':gfxdecode'
Starting palette ':palette'
Starting Video Screen ':screen'
Starting Speaker ':speaker'
  (missing dependencies; rescheduling)
Starting Generic 8-bit latch ':soundlatch'
Starting Irem M72 Audio Custom ':m72'
Optional device ':dac' not found
Optional memory region ':samples' not found
Starting YM2151 ':ymsnd'
Starting R-Type (World) ':'
Optional I/O port ':JumperJ3' not found
Optional shared pointer ':spriteram2' not found
Optional shared pointer ':majtitle_rowscr' not found
Optional device ':dac' not found
Optional device ':mcu' not found
  (missing dependencies; rescheduling)
Starting Speaker ':speaker'
Starting R-Type (World) ':'
Optional I/O port ':JumperJ3' not found
Optional shared pointer ':spriteram2' not found
Optional shared pointer ':majtitle_rowscr' not found
Optional device ':dac' not found
Optional device ':mcu' not found
Starting R-Type (World)
hiscore: found hiscore.dat entry for rtype
Searching font Liberation Sans in -/home/roms/mame/fonts path/s
font Liberation Sans|Regular is not TrueType or BDF, using MAME default
hiscore: scores read
Average speed: 99.94% (85 seconds)
Sound: overflows=4 underflows=16
Enter sdlwindow_exit
Leave sdlwindow_exit
SwitchRes: Restoring desktop resolution:
SwitchRes: xrandr original video mode restored.

I'll keep testing over the coming days and of course will update if it breaks but I think this may have solved it. I've also done lots of pausing and leaving and coming back. This was breaking the sound consistently before but I have not had one drop out since making those changes.

Just for your reference I tried dmix too for the pa_device but that seemed to have issues.

The parts of the log that are clearly different from the log I posted previous are:

PortAudio: Using device "HDA Intel PCH: ALC887-VD Analog (hw:0,0)" on API "ALSA"
PortAudio: Sample rate is 48000 Hz, device output latency is 5.75 ms (I think this was highter in the last log)
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames (I think this was higher in the last log)

Thanks again for taking the time to work through this, not sure what we can take from it. I guess it's best on a linux setup to specify those variables.

Strontium  :cheers:

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #72 on: February 13, 2017, 01:43:27 pm »
The parts of the log that are clearly different from the log I posted previous are:

PortAudio: Using device "HDA Intel PCH: ALC887-VD Analog (hw:0,0)" on API "ALSA"
PortAudio: Sample rate is 48000 Hz, device output latency is 5.75 ms (I think this was highter in the last log)
PortAudio: Allowed additional buffering latency is 10.00 ms/480 frames (I think this was higher in the last log)

Yes, it's definitely decreased, I suspect PortAudio takes exclusive control over the audio device which leads to decreased latency, but I can't say for certain. I'd say this configuration will offer you lower latency than SDL.

Thanks again for testing and reporting, I'm very glad it got sorted. It appears dmix is the culprit in this case, which is good information that will help others if they encounter similar issues. Also this shows how important it is to inspect the log, for the implementation to use the specified device, the API also needs to be specified. The rationale behind this is that the naming is ambiguous. It might be better for consistency though to use the device from the default API if the API is unspecified.

I understand your issues with the documentation - there really isn't any. I'm working on it, but some trial and error is definitely to be expected.

rCadeGaming

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1251
  • Just call me Rob!
Re: Is GroovyMame + ASIO still a thing?
« Reply #73 on: May 31, 2017, 11:56:26 pm »
Hi all.  Trying wrap my head around this while trying to get back into GroovyMAME for a few years.  I didn't know much about the history with ASIO/BASSASIO, so please bear with me.  I'm running W7x64 and plan on starting with the pre-compiled GroovyMAME 0183.017c_d3d9ex binary.  I'll compile my own and switch to the latest MAME once I update my ROM set.

Anyhow, two questions:

1.  How should I determine the value for -pa_latency?

2.  Can I use d3d9ex with Portaudio?  I thought a read something about a conflict?
« Last Edit: June 02, 2017, 08:46:06 am by rCadeGaming »

donluca

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 94
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #74 on: June 25, 2017, 05:01:16 am »
Out of curiosity, has anyone tried using portaudio with ASIO4All?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #75 on: July 02, 2017, 05:12:48 pm »
1.  How should I determine the value for -pa_latency?

Unfortunately, trial and error. On Windows the values that are found in this thread for WASAPI/WDM-KS seem to work on most setups.

Out of curiosity, has anyone tried using portaudio with ASIO4All?

There would be no reason to. ASIO4ALL most likely uses WDM-KS, which PortAudio already has native support for.

  
 

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