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
Lightguns Arcade1Up Try the site in https mode 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 23537 times)

0 Members and 1 Guest are viewing this topic.

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
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 of pasting it.

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

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1470
  • Last login:March 04, 2024, 03:20:27 am
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 50
  • Last login:February 26, 2024, 04:51:02 pm
  • 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: 1470
  • Last login:March 04, 2024, 03:20:27 am
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 1470
  • Last login:March 04, 2024, 03:20:27 am
  • 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.

RobeeJ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 120
  • Last login:Today at 04:36:19 am
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
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 of pasting it.

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

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 268
  • Last login:December 08, 2023, 02:31:38 pm
  • Mame forever.
    • https://github.com/oomek
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 73
  • Last login:December 02, 2021, 05:12:52 pm
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 73
  • Last login:December 02, 2021, 05:12:52 pm
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: 73
  • Last login:December 02, 2021, 05:12:52 pm
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 73
  • Last login:December 02, 2021, 05:12:52 pm
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 156
  • Last login:April 07, 2022, 04:55:03 am
  • 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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 73
  • Last login:December 02, 2021, 05:12:52 pm
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 73
  • Last login:December 02, 2021, 05:12:52 pm
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: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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: 1256
  • Last login:December 20, 2023, 09:16:09 pm
  • 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: 261
  • Last login:Today at 06:46:41 am
  • 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?
On a scale of fakeness, from more genuine to more fake, we'd have:

1.- Plastic plants (cf. Fake Plastic Trees)
2.- Inflatable dolls
3.- Arcade cabinets with LCD monitors

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:Yesterday at 05:29:57 pm
  • 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.

archimage

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:September 25, 2023, 11:46:38 am
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #76 on: August 18, 2018, 02:45:32 pm »
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.

Hello, I have the same problem when using an internal M-Audio card, it works with MME and Directsound but I get the same error with WASAPI and WDM-KS, is there a workaround about this exclusive access ?

Thanks !

groovy

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:November 25, 2018, 05:19:02 pm
  • I want to build my own arcade controls!
Re: Is GroovyMame + ASIO still a thing?
« Reply #77 on: August 27, 2018, 04:05:47 am »
it is possible to select a sample rate of 22050khz or 32000khz with portaudio, now only work with 44100khz and 48000khz  :cheers: :cheers: