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: Solution to sound with GroovyMAME + HyperSpin + Portaudio  (Read 10008 times)

0 Members and 1 Guest are viewing this topic.

agalardi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:March 21, 2020, 02:46:05 pm
  • Be water my friend....
Solution to sound with GroovyMAME + HyperSpin + Portaudio
« on: October 10, 2019, 09:17:08 am »
Hi, I would like to do my bit to this forum.

I faced several sound problems to work with groovyMAME (0.213) with portaudio and some frontends (HyperSpin+RocketLaunch in my last try).

The problem mainly is that both programs want the audio device at the same time (I am sure that it is more complicated, but basically...).

I solved the problem installing a "virtual sound card" that really pipe the output to the real one. I set groovyMAME to virtual device and VOILA!

The program (free) I used is "Virtual Audio Cable" and It is really easy to install and configure. I do not say the URL because I don't know the forum rules.

If someone want more details, please let me know and I will do my best.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:April 11, 2024, 04:05:15 am
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #1 on: October 12, 2019, 09:40:05 am »
Personally i use 2 sound cards. Not specifically because of portaudio or hyperspin.
But your solution sounds great.
It will probably be useful for retroarch with wasapi, too.

alex2005

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 20, 2023, 09:21:14 am
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #2 on: October 13, 2019, 10:51:57 am »
Could you please elaborate a bit how did you set up?
I downloaded the program and my mame ini loos like this:

sound                     portaudio
audio_latency             1.0


pa_api                    "Windows WASAPI"
pa_device                 "CABLE Output (VB-Audio Virtual Cable)"
pa_latency                0.003334

But im getting no sound in Cadillacs and Dinosaurs" for instance.
I use Windows 7 x64 with Hyperspin and Groovymame (not rocketlauncher)

As I have a Realtek integrated souncard (which I heard is not supported), what I used until now was:

#pa_api                    "Windows Directsound"
#pa_device                 none
#pa_latency                0.017


Thank you!

agalardi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:March 21, 2020, 02:46:05 pm
  • Be water my friend....
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #3 on: October 14, 2019, 04:32:50 am »
First of all, you need to configure the "vitual cable" so you need to go win Windows to:
- Sound->Recording->CABLE Output->Properties->Listen Tab-> Click "Listen this device" and SELECT YOUR REAL SOUND CARD->Apply and exit.

Second is to select the right device in MAME.INI. Those are my settings, but the most important for you is pa_device:

Code: [Select]
sound                     portaudio
audio_latency          0

pa_api                   "Windows WDM-KS"
pa_device               "Speakers (VB-Audio Point)"
pa_latency              0.001

Try again with those settings and good luck!

alex2005

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 20, 2023, 09:21:14 am
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #4 on: October 14, 2019, 02:20:42 pm »
Thank you!
Seems to work like a charm now.
I have

pa_api                    "Windows WDM-KS"
pa_device                 "Speakers (VB-Audio Point)"
pa_latency                0.001

and using windows 7 x64

I dont "hear" a lot of difference with portaudio and without, even on Cadillacs and Dinosaurs. Are there other games where this difference is noticeable?

Paradroid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 687
  • Last login:April 12, 2024, 04:50:06 pm
    • SCART Hunter
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #5 on: October 14, 2019, 03:06:09 pm »


I dont "hear" a lot of difference with portaudio and without, even on Cadillacs and Dinosaurs.

There is no tonal difference: it's all about latency. You will hear the sound sooner with Port Audio.

Sent from my SM-G955F using Tapatalk

My MAME/SCART/CRT blog: SCART Hunter

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #6 on: October 14, 2019, 06:52:41 pm »
It doesn't work for me :(
I have configurated mame.ini properly, I have sound in MAME running with this thing. But once in MAME after hyperspin I don't have any sound

I'm also using:

pa_api                    "Windows WDM-KS"

in pa_device I've tried several options: "Altavoces (VB-Audio Point)" (my w7 is in spanish) or "Speakers (VB-Audio Point)"...... Whatever I write in "pa_device" I always have sound in MAME, but never in mame after hyperspin.
BTW, why do you call de device (VB-Audio Point) ??  I haven't seen that name ending in "point" anywhere in Windows. In Windows 7 this virtual audio device is called VB-Audio Virtual Cable

The driver name for me in Windows 7 x64 is not VB-Audio Point, it is VB-Audio Virtual Cable
« Last Edit: October 14, 2019, 07:47:08 pm by anchounio »

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #7 on: October 14, 2019, 07:44:47 pm »
the nvidia q3583 is my main sound card

I guess this should be my configuration: 


sound                     portaudio
audio_latency          0

# PORTAUDIO OPTIONS
#
pa_api                    "Windows WDM-KS"
pa_device                 "CABLE Output (VB-Audio Virtual Cable)"
pa_latency                0.001


it doesn't work anyway. It seems mame doesn't recognize the pa_device and just uses the default sound card, with the obvious issue with hyperspin.
« Last Edit: October 14, 2019, 08:07:25 pm by anchounio »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:April 11, 2024, 04:05:15 am
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #8 on: October 14, 2019, 08:26:32 pm »
Please post a log.

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #9 on: October 14, 2019, 09:15:43 pm »
MAME behaviour has changed now. Now mame64 crashes unless I run it on cmd. In that case it gives this error:

Portaudio error: Invalid device

(no error.log file is created)

If I run it double-clicking on mame64 icon mame will crash, even if I have "none" in pa_device

The only solution after this is disabling and enabling again my sound card. Then MAME behaves normally again.
« Last Edit: October 14, 2019, 09:18:42 pm by anchounio »

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #10 on: October 14, 2019, 09:25:43 pm »
FIXED !!!

I've connected an USB sound card I had and it perfectly works now !!

The problem was that integrated sound card inside my NVIDIA graphic card.

The parameters in mame.ini are the same as the ones previously indicated.

agalardi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:March 21, 2020, 02:46:05 pm
  • Be water my friend....
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #11 on: October 15, 2019, 03:31:47 am »
Anchounio,

Of course, a second sound card solve the problem. That is because a virtual one solve it too.

Let me explain the process in detail:

- Download VBCABLE_Driver_Pack43.zip and install it (VBCABLE_Setup.exe)


- Configure VBCABLE:

   - Go to Windows sound properties: Start->Run: control mmsys.cpl sounds
      (also Control Panel->Sounds, or right click speaker icon...)
   - Recording TAB->Cable Output->Properties->Listen TAB:
      - Tick "Listen this device"
      - Select your Real sound card

<<<<I am sorry, I don't know how to insert a screenshot>>>


- Configure GroovyMAME:

   - We need to identify the name of the virtual sound card from GroovyMame:
      - From CMD we launch "groovymame64ex.exe -sound portaudio -v"
      - We exit groovymame (usually ESC)
      - We analize the console output taking into account lines starting with "PortAudio:"
         - We will see the same devices in each API (MME, DirectSound, WASAPI, WDM-KS, etc.)
Code: [Select]
...
PortAudio: Windows WASAPI: "CABLE Input (VB-Audio Virtual Cable)"
PortAudio: Windows WASAPI: "CABLE Output (VB-Audio Virtual Cable)"
PortAudio: API Windows WDM-KS has 6 devices
PortAudio: Windows WDM-KS: "Speakers (Realtek HD Audio output)" (default)
PortAudio: Windows WDM-KS: "Línea de entrada (Realtek HD Audio Line input)"
PortAudio: Windows WDM-KS: "Micr├│fono (Realtek HD Audio Mic input)"
PortAudio: Windows WDM-KS: "Mezcla est├®reo (Realtek HD Audio Stereo input)"
PortAudio: Windows WDM-KS: "CABLE Output (VB-Audio Point)"
[b]PortAudio: Windows WDM-KS: "Speakers (VB-Audio Point)"[/b]
PortAudio: Using device "Speakers (VB-Audio Point)" on API "Windows WDM-KS"
PortAudio: Sample rate is 48000 Hz, device output latency is 10.00 ms
...

      The name of the device should be "Speakers (VB-Audio Point)".

   - We Configure MAME.INI
      - I choosed WDM-KS API so my config is:
Code: [Select]
sound                     portaudio
audio_latency          0

pa_api                   "Windows WDM-KS"
pa_device               "Speakers (VB-Audio Point)"
pa_latency              0.001

I hope I have explained it better now  ;)

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #12 on: October 15, 2019, 10:19:39 am »
Thank you for the better explanation agalardi

In my case, my problem was that the integrated nvidia sound card just didn't work for this. I disabled it, installed an USB sound card, configured the virtual one and it worked with no problems !

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #13 on: October 16, 2019, 05:32:15 pm »
It randomly fails, and doesn't work again untill windows restart. It is not related with MAME: it doesn't even work inside the "sound" menu in Windows 7. 
« Last Edit: October 16, 2019, 05:33:47 pm by anchounio »

agalardi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:March 21, 2020, 02:46:05 pm
  • Be water my friend....
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #14 on: October 17, 2019, 03:10:56 am »
Hi anchounio,

All I can say that it is working for me without failures. It would be great if we could get the experience of other people.

Have you tried disabling your NVIDIA integrated sound device from BIOS?

Could your try to disable and re-enable audio devices USB and VB-Cable (only one per try) from device manager?

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #15 on: October 17, 2019, 05:29:13 am »
Yeah, I've tried disabling the vb-cable from device manager, enabling again but it still doesn't work
When it fails, the only solution is restarting my pc... which is not my desired solution.

I haven't tried to disable the remaining sound cards. I'll try it and keep you informed :)

alex2005

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 20, 2023, 09:21:14 am
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #16 on: October 17, 2019, 02:19:01 pm »
working like a charm for me :)

mrchrister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Last login:April 15, 2024, 10:39:26 am
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #17 on: October 21, 2019, 02:57:27 pm »
i wonder if using a virtual audio driver could introduce lag?

agalardi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:March 21, 2020, 02:46:05 pm
  • Be water my friend....
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #18 on: October 22, 2019, 06:25:33 am »
working like a charm for me :)

Great! I would be even better if we could have the experience of more people.

i wonder if using a virtual audio driver could introduce lag?

I haven't notice any lag, but I am sot sure.

Thinking about it, if we detect any lag, maybe it would be better to set virtual audio as default to work in HyperSpin and point GM portaudio device to real one.

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #19 on: October 23, 2019, 08:16:31 am »
Thinking about it, if we detect any lag, maybe it would be better to set virtual audio as default to work in HyperSpin and point GM portaudio device to real one.

I'm afraid that's not possible. Hyperspin will work by default with the main sound device with no option to change it.  Hyperspin loves not allowing to configure stuff. It also loves not solving their own issues, as its portaudio+MAME problem

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #20 on: October 23, 2019, 08:18:48 am »
By the way, I've long tested this solution now and I haven't experienced any more problems... It seems its failure the other day was an isolated problem, not caused by the virtual audio device.

agalardi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:March 21, 2020, 02:46:05 pm
  • Be water my friend....
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #21 on: October 23, 2019, 08:53:26 am »
Thinking about it, if we detect any lag, maybe it would be better to set virtual audio as default to work in HyperSpin and point GM portaudio device to real one.

I'm afraid that's not possible. Hyperspin will work by default with the main sound device with no option to change it.  Hyperspin loves not allowing to configure stuff. It also loves not solving their own issues, as its portaudio+MAME problem

anchounio, when I said to set the virtual audio as default, I referred to set it as main sound device. In this way HyperSpin should work.

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 121
  • Last login:December 17, 2023, 04:24:10 pm
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #22 on: October 23, 2019, 04:31:46 pm »
Thinking about it, if we detect any lag, maybe it would be better to set virtual audio as default to work in HyperSpin and point GM portaudio device to real one.

I'm afraid that's not possible. Hyperspin will work by default with the main sound device with no option to change it.  Hyperspin loves not allowing to configure stuff. It also loves not solving their own issues, as its portaudio+MAME problem

anchounio, when I said to set the virtual audio as default, I referred to set it as main sound device. In this way HyperSpin should work.

Haha, I didn't realize!
That's a good idea!

yakk11

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 89
  • Last login:August 23, 2023, 07:41:58 pm
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #23 on: November 01, 2019, 07:53:00 pm »
This solution worked for me!  Thank you! :applaud:

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:April 11, 2024, 04:05:15 am
  • I want to build my own arcade controls!
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #24 on: December 21, 2019, 10:42:44 pm »
Had a chance to try it. It works but i immediately noticed much more latency. I've checked my settings to be sure and also verified mame is using portaudio with the correct device. There is definitely more latency.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #25 on: December 23, 2019, 03:47:45 am »
Had a chance to try it. It works but i immediately noticed much more latency. I've checked my settings to be sure and also verified mame is using portaudio with the correct device. There is definitely more latency.

I thought that immediately when OP's posted about this solution. I could be wrong but appearently creating an indirect path for audio completely defeats the purpose of Portaudio in terms of low latency.

Problems caused by frontends should be addressed in the frontend's code itself. We should be merciless with frontends that break our emulators in any way.
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

mrchrister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Last login:April 15, 2024, 10:39:26 am
Re: Solution to sound with GroovyMAME + HyperSpin + Portaudio
« Reply #26 on: April 06, 2020, 12:16:21 pm »
I have it set up the the other way around - as mentioned earlier.
Default Windows Device - Virtual Audio Cable (not routed or configured in any way)
Mame - Portaudio
I don't have any attract sounds in Hyperspin so this worked great for me.