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: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)  (Read 10530 times)

0 Members and 1 Guest are viewing this topic.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« on: November 26, 2007, 02:08:26 pm »
I am sure that I am not the only arcade hobbyist that has thought about attempting something like this.  Anyone have any thoughts on how to redirect to a specific audio output device?  I am thinking about installing two audio cards with one being output for mame/mala specific emulation and the other audio output for Windows specific sound and or audio playback as such with a Jukebox player.  I am not sure what if any software application can be modified for this specific purpose.  I know that mame allows for specific video output but the audio redirect function may not be implemented or I am not aware of it yet. 

I am wanting to use "The PC Jukebox Player" software application for mp3 (touch) playback but that specific application does not support directing to a specific audio output and only will use the Windows default audio. 

It would be a pain in the rear to have to switch audio output with Windows everytime I want to switch software applications.  I do have 4 speaker split in pairs on my arcade box thinking that I could have separate volume control and audio output if I can ever figure out how to implement audio redirection within Mala, Microsoft Windows (XP) or Mame (DOS). 

Does Mala have this functionality anywhere within it's realm and or could this be implemented?  Surely I am not the only one wanting to use both the arcade as a gaming system and jukebox player.  Again any thoughts and opinions are more than welcome.   

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #1 on: November 26, 2007, 11:35:24 pm »
I'm a little slow.  Are you wanting the PC Jukebox Player to play on one set of speakers and Mame and Mala to play on the other set?  I'm not understanding what you want to accomplish. 

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #2 on: November 27, 2007, 12:24:01 am »
I'm a little slow.  Are you wanting the PC Jukebox Player to play on one set of speakers and Mame and Mala to play on the other set?  I'm not understanding what you want to accomplish. 


I think that's it.  I say get another 2nd hand PC to run your Juke box :-)  You can hide it in your cab if you want and have it on a KVM switch to your monitor, it's not worth it IMHO.  ;)

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #3 on: November 27, 2007, 08:25:20 am »
I'm a little slow.  Are you wanting the PC Jukebox Player to play on one set of speakers and Mame and Mala to play on the other set?  I'm not understanding what you want to accomplish. 


I think that's it.  I say get another 2nd hand PC to run your Juke box :-)  You can hide it in your cab if you want and have it on a KVM switch to your monitor, it's not worth it IMHO.  ;)

SGT, yes you are correct.  Just wanted to be able to use one machine with two audio cards with the option to redirect audio within Mame, Mala or Windows as to force audio output per software application. 

Thanks for you comment loadman.  Unfortunately, that is what I do not want to happen.  I would prefer to have all my mp3 songs and video gaming on one machine.  Awhile back, I was browsing through some forums, not sure if this is the correct forum or not but somebody actually created a diff update to mame that would allow redirect of audio within Mame (Dos).  At one point, I found that diff and tried to update the latest version of Mame (dos) but the diff update failed.  I am assuming because the source code could have possibly changed on the latest mame (dos) compilation.  Just wondering if anyone had any experience with modifying either the mame (dos) compilation and or if the Mala creator would be able to add this in the functionality.  I can't think of any other way to accomplish this.  I have been searching for a software application that I can install within Windows and possibly be able to handle management of audio output to specific applications, but again have been unsuccessful. 

As a last resort, a second PC will be added but I am really trying to stay away from that.  Thanks, Shane

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #4 on: November 27, 2007, 08:30:09 am »
I'm a little slow.  Are you wanting the PC Jukebox Player to play on one set of speakers and Mame and Mala to play on the other set?  I'm not understanding what you want to accomplish. 

Yes SGT you are correct.  Please reference post to loadman for further clarification.  I would eventually love to be able to use one PC with two sets of speackers grouped in pairs to be able to control/manage audio output to either pair of speakers.  Example would be mame (dos), Windows audio to pair1 and mp3 playback to speaker pair2 or vice verse.  I am wondering if audio redirection can be implemented in Mala or mame (dos) as a diff update.  Or maybe there is a separate application install that can be installed within Windows that will allow management of audio output to specific applications.  I have spent hours trying to find anything that I can try with no avail luck.  Thanks,

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #5 on: November 27, 2007, 08:58:38 am »
Yes you can do what you want. You will have to get another sound card, for example a USB sound card or PCI card (two of the same may conflict though) and connect it up to your PC. I think onboard video and USB or PCI card should be okay together. Then in your media player application you can select which card to use for output. For example in WinAmp you can choose the codec for playing MP3 and open the properties for it. There you can choose "Wave Mapper" or your sound card. So really you just need two sound cards.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #6 on: November 27, 2007, 11:08:53 am »
Yes you can do what you want. You will have to get another sound card, for example a USB sound card or PCI card (two of the same may conflict though) and connect it up to your PC. I think onboard video and USB or PCI card should be okay together. Then in your media player application you can select which card to use for output. For example in WinAmp you can choose the codec for playing MP3 and open the properties for it. There you can choose "Wave Mapper" or your sound card. So really you just need two sound cards.

Thanks for the update headkaze.  I aleady knew that such player as Winamp one would be able to select audio output source but let's say that the application of choice does not support that option.  Such an application would be "The PC Jukebox Player".  This is a jukebox player that has touchscreen capability which I will be using and does not support the option to select audio source, instead will use the Windows default audio driver.  I was hoping that there was a way within Mala or someone that is familiar with the mame (dos) source code to be able to create a generic diff update similiar to the hiscore diff update that can be implemented within the source code for further functionality that would allow the option to select/output to a specified audio source.  Thanks though for the updates. 

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #7 on: November 27, 2007, 04:33:50 pm »
Update:

Below is the link to the forum and post that I read about a diff update for the Windows command line version of mame.  I thought it was mame dos.  I had this diff update but can't seem to locate it now.  I did attempt to update one of the later versions of mame windows command line with this update but failed due to a source code error.  I am thinking this diff update is for a specific version of the source code.  I hope someone will be able to create a generic diff update for this functionality similiar to the hiscore diff update that be performed on the updated versions of the mame source code as they are released.  See below link. 

http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=99018&page=0&view=expanded&sb=5&o=&fpart=1&vc=1

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #8 on: November 28, 2007, 05:13:41 am »
Diff's generally only work for the version of Mame they are created for and maybe a few versions after. It depends on if the diff modifies files that are changed in a release.

Your in luck because I was feeling generous today and I created a new patch for Mame 0121 that will add the multiple sound card support. Quite a few things have changed since that Mame 0111u3 patch so fingers crossed I translated it okay to the new source.

You will need to test it as I don't have multiple sound cards to test.

Quote
To list the available sound devices:
mame.exe -listsounddevices (or -lsd)

To select one of the available sound cards, eg. #2:
mame.exe -sounddevice 2 (or -sd 2)

Or place the following in mame.ini
sounddevice           2

Thanks go to Zinky for the original patch.
« Last Edit: November 28, 2007, 06:00:30 am by headkaze »

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #9 on: November 28, 2007, 10:56:27 am »
Diff's generally only work for the version of Mame they are created for and maybe a few versions after. It depends on if the diff modifies files that are changed in a release.

Your in luck because I was feeling generous today and I created a new patch for Mame 0121 that will add the multiple sound card support. Quite a few things have changed since that Mame 0111u3 patch so fingers crossed I translated it okay to the new source.

You will need to test it as I don't have multiple sound cards to test.

Quote
To list the available sound devices:
mame.exe -listsounddevices (or -lsd)

To select one of the available sound cards, eg. #2:
mame.exe -sounddevice 2 (or -sd 2)

Or place the following in mame.ini
sounddevice           2

Thanks go to Zinky for the original patch.

You are the man headkaze.  I downloaded 0.121 windows command line of mame.  I then followed Mr. Do's instructions (www.mameworld.net/mrdo/compile.html) as to download and update the mame source with the diff update provided.  Looks like your diff update did infact successfully update the source code but when I try to recompile the mame command line executable I get the following error:


C:\>cd mamesrc

C:\mamesrc>patchmame

C:\mamesrc>patch -p0 -E  0<snd_0121.diff
patching file src/emu/clifront.c
patching file src/emu/clifront.h
patching file src/emu/emuopts.c
Hunk #1 succeeded at 111 (offset 1 line).
patching file src/emu/emuopts.h
Hunk #1 succeeded at 104 (offset 1 line).
patching file src/emu/mame.c
Hunk #1 succeeded at 1401 (offset -28 lines).
patching file src/emu/mame.h
Hunk #1 succeeded at 180 (offset -12 lines).
patching file src/osd/osdepend.h
patching file src/osd/windows/sound.c
Hunk #1 succeeded at 65 (offset -1 lines).

C:\mamesrc>makemame

C:\mamesrc>set path=c:\mingw\bin

C:\mamesrc>mingw32-make
src/emu/cpu/cpu.mak:16: *** extraneous `endif'.  Stop.

I don't remember having this much difficulty recompiling the executable some moths ago.  Thanks for any info.  Thanks,

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #10 on: November 28, 2007, 11:02:58 pm »
Okay here are some simple instructions

1. Download Mame Compiler Setup from here
2. Install it by running setup.exe
3. Copy the snd_0121.diff file to C:\Program Files\Mame Compilers\Patches
4. Extract the Mame 0121 source code wherever you want
5. Select Start->Programs->Mame Compiler->MameCompiler
6. Click the [...] button to browse to the "Mame Source Folder" where you extracted the Mame 0121 source
7. Click the [...] button to browse to the "Diff Patch File" and point it to snd_0121.diff
8. Press the "Apply Patch File" button to apply the diff
9. Select your Compile options (Eg. Optimize for Pentium 4 or whatever processor you have)
10. Press the "GO!" button to start compiling

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #11 on: November 30, 2007, 08:46:56 pm »
Okay here are some simple instructions

1. Download Mame Compiler Setup from here
2. Install it by running setup.exe
3. Copy the snd_0121.diff file to C:\Program Files\Mame Compilers\Patches
4. Extract the Mame 0121 source code wherever you want
5. Select Start->Programs->Mame Compiler->MameCompiler
6. Click the [...] button to browse to the "Mame Source Folder" where you extracted the Mame 0121 source
7. Click the [...] button to browse to the "Diff Patch File" and point it to snd_0121.diff
8. Press the "Apply Patch File" button to apply the diff
9. Select your Compile options (Eg. Optimize for Pentium 4 or whatever processor you have)
10. Press the "GO!" button to start compiling

Some of you guys are really amazing with some of your abilities to make life easier for all others in this hobby.  I was successful in compiling the latest version of mame with the latest version diff update and the hiscore update.  Your program is very well built and easy to use.  I will be testing out the actual audio redirection first using the command prompt to launch mame with the correct switch.  If this is successful, where in Mala would one incorporate the switches needed to be used during the launch of mame?  I know I will be using the sound switch redirect a well as the video switch redirect.  I do not have my mame PC built yet so I have not had a chance to walk through the Mala configs.  Just thought I would ask. 

Again, thanks for all your help and this goes out to the handful of users out there that are very active in creating, modifying, applications and programs to use with the mame arcade world.  AWESOME JOB AND KEEP UP THE GREAT WORK. 

I only wish that my financial situation was in a position that I would not have to worry about spending.  I would not have any problem supporting those software programmers.  We all know that those vendors creating new hardware technology reap most of the financial outcome but leave very little for software developers.  Thanks, headkaze...  Pleasure to work with.   

Thanks, Shane

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #12 on: December 01, 2007, 02:27:10 am »
Appreciate the kind words slsimon. I think alot of people would be happy to donate more to the programmers if they could afford it. I think it's near on impossible to go commerical writing software for the arcade industry. There is also the stigma of making money off the coders who write the emulators. But it is nice to be acknowledged and appreciated  :cheers:

Anyway, I'm not sure about Mala but you can definately give Mame command line options, just like any other FE. You can of course opt to put the options in mame.ini which makes it just a perminant as using command line. When you run "mame.exe -cc" it will create mame.ini. Inside you will see the sounddevice option.

It's good to hear you can apply both hiscore and sound patches together :)

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #13 on: December 01, 2007, 05:39:49 am »
Attached is a shot of where you can add to the command line that mala send to mame. Obviously the %rom% part gets substituted my mala with the games rom name before launching mame.

But I think headkaze has the right idea. Just edit the soundcard details in mame.ini instead.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #14 on: December 25, 2007, 09:15:49 pm »
Diff's generally only work for the version of Mame they are created for and maybe a few versions after. It depends on if the diff modifies files that are changed in a release.

Your in luck because I was feeling generous today and I created a new patch for Mame 0121 that will add the multiple sound card support. Quite a few things have changed since that Mame 0111u3 patch so fingers crossed I translated it okay to the new source.

You will need to test it as I don't have multiple sound cards to test.

Quote
To list the available sound devices:
mame.exe -listsounddevices (or -lsd)

To select one of the available sound cards, eg. #2:
mame.exe -sounddevice 2 (or -sd 2)

Or place the following in mame.ini
sounddevice           2

Thanks go to Zinky for the original patch.

Headkaze, when time permits, would you be willing to supply another sound diff update for the windows command line version 0.122?  From reading previous threads, sounds like some of the lightgun support for version 0.121 was broke and is now fixed in 0.122 and of course I have two Act Labs guns that I plan on using.  I just finished building my mame PC and am now on the next phase of installing and compiling all the necessary software/files that I will need on my mame machine.   Again, thanks for all your help.   :cheers:

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #15 on: December 25, 2007, 09:54:34 pm »
Headkaze, when time permits, would you be willing to supply another sound diff update for the windows command line version 0.122?  From reading previous threads, sounds like some of the lightgun support for version 0.121 was broke and is now fixed in 0.122 and of course I have two Act Labs guns that I plan on using.  I just finished building my mame PC and am now on the next phase of installing and compiling all the necessary software/files that I will need on my mame machine.   Again, thanks for all your help.   :cheers:

Have you tried applying the patch for 0.122? Often the same patch will work for several versions before the changes are great enough to break them. If it doesn't work for you I'll make a new patch.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #16 on: December 26, 2007, 09:05:17 am »
Headkaze, when time permits, would you be willing to supply another sound diff update for the windows command line version 0.122?  From reading previous threads, sounds like some of the lightgun support for version 0.121 was broke and is now fixed in 0.122 and of course I have two Act Labs guns that I plan on using.  I just finished building my mame PC and am now on the next phase of installing and compiling all the necessary software/files that I will need on my mame machine.   Again, thanks for all your help.   :cheers:

Have you tried applying the patch for 0.122? Often the same patch will work for several versions before the changes are great enough to break them. If it doesn't work for you I'll make a new patch.

Currently compiling mame windows command line version 0.122 with u1 diff update, hi diff update as well as 0.121 sound update with no errors.  Very good.  Thank you headkaze..  Thanks, Shane

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #17 on: December 30, 2007, 07:50:10 pm »
Diff's generally only work for the version of Mame they are created for and maybe a few versions after. It depends on if the diff modifies files that are changed in a release.

Your in luck because I was feeling generous today and I created a new patch for Mame 0121 that will add the multiple sound card support. Quite a few things have changed since that Mame 0111u3 patch so fingers crossed I translated it okay to the new source.

You will need to test it as I don't have multiple sound cards to test.

Quote
To list the available sound devices:
mame.exe -listsounddevices (or -lsd)

To select one of the available sound cards, eg. #2:
mame.exe -sounddevice 2 (or -sd 2)

Or place the following in mame.ini
sounddevice           2

Thanks go to Zinky for the original patch.

Hello headkaze.  Just now getting around to testing your sound diff update.  Sorry I am slow!!   ;D  Please see attached PNG file.  I am receiving an error while trying to run the either switch (-sounddevice 2 or -sd 2) with mame version 0.122u1 with the hiscore and the sound diff update.  Let me know what you can come up with.  I am now able to test on my mame machine, both audio and video.  Thanks,

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #18 on: December 30, 2007, 08:51:28 pm »
What happens when you enter as HeadKaze Suggests:

Quote
To list the available sound devices:
mame.exe -listsounddevices (or -lsd)

That will reveal the real devices on your computer.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #19 on: December 30, 2007, 10:03:48 pm »
What happens when you enter as HeadKaze Suggests:

Quote
To list the available sound devices:
mame.exe -listsounddevices (or -lsd)

That will reveal the real devices on your computer.

Thanks loadman for the reminder!!  I overlooked the -listsounddevices option.  Attached is a screenshot of what my hardware shows.  Somewhat makes since now why device 2 would not work for me.  I think I either need device 0 or 3.  Device 0 is my onboard and device 3 is the SB Live PCI card.  I am not sure what device 1 and 2 are for.  Device 2 is tagged with my Video card and I am assuming device and the onboard audio is a realtek driver so device 1 must be tagged with device 0.  I am going to have to test these setting out.  I will keep you posted.  See attached...


slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #20 on: December 30, 2007, 10:10:02 pm »
All switches with the -sounddevice switch errors out with all sound devices listed.  See attached...


headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #21 on: December 31, 2007, 03:18:27 am »
I'm pretty sure that patch should work with the latest version of Mame but I created a new one just in case.

Here are the instructions.

1. Use a fresh extract of the Mame 0122 source code
2. Apply the 0122u1.diff then the 0122u2.diff
3. Apply the snd_0122u2.diff
4. Apply the hi_122.diff
5. Compile

I have tested this myself and it works fine in that order (applying patches in the right order is important).
« Last Edit: December 31, 2007, 03:20:07 am by headkaze »

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #22 on: December 31, 2007, 08:18:07 am »
Will be compiling here in a couple of minutes.  Question concerning your mame compiler.  My processor is a P4 3.0GHZ with 800MHZ Front Side Bus (hyperthreading).  The processor box says that this processor supports 64-bit OS.  Does this mean that this is a 64-bit processor or dual core?  Wondering if I should check either of these boxes within your compiler.  I will compile with the P4 option as well.  Thanks, Shane

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #23 on: December 31, 2007, 08:23:51 am »
Will be compiling here in a couple of minutes.  Question concerning your mame compiler.  My processor is a P4 3.0GHZ with 800MHZ Front Side Bus (hyperthreading).  The processor box says that this processor supports 64-bit OS.  Does this mean that this is a 64-bit processor or dual core?  Wondering if I should check either of these boxes within your compiler.  I will compile with the P4 option as well.  Thanks, Shane

The Pentium4 option is all you need. Since you have a HT processor setting Dual Core option may speed up compiling by about 5 minutes. In my test with similar processor was 7 minutes faster with Dual Core option. But it will have no difference on the resulting binary.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #24 on: December 31, 2007, 08:52:33 am »
Thanks headkaze.  As usual, you have been of much help.  Currently compiling.  Will not be able to test until later this evening.  I will be sure to keep everyone posted on this thread.  Thanks, Shane

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #25 on: December 31, 2007, 02:51:33 pm »
Successfully compiled!!  Audio redirection works but has a little synch issue with the audio and video.  Is there a setting I can play with to try to better the audio output in mala or mame?  Ok, now for another question.  The AVI previews in Mala have no sound now since I changed the mame.ini to sounddevice 3.  Is there a setting in the mala.ini file that needs to be changed.  Wondering if the Mala still thinks to output to the Windows default sound.  Again thanks,


slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #26 on: December 31, 2007, 06:54:46 pm »
Just wanted to update.  The avi's are infact playing audio output to Windows default sound.  Mame sound output works with either the the following command or with the the mame.ini file configured with the correct output. 

mame -sounddevices outputdevicenumber romfile

Headkaze, loadman or mala team, any ideas as to why the audio and video is out of synch and or know what settings I can play with to possibly fix the synch issue?  Also, is there anyway that the game avi previews audio within the mala layout be directed to another audio output?  Other than that, I think we have this thread finished.  Thanks,
« Last Edit: December 31, 2007, 06:56:46 pm by slsimon »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #27 on: January 01, 2008, 01:11:00 am »
Just wanted to update.  The avi's are infact playing audio output to Windows default sound.  Mame sound output works with either the the following command or with the the mame.ini file configured with the correct output. 

mame -sounddevices outputdevicenumber romfile

Headkaze, loadman or mala team, any ideas as to why the audio and video is out of synch and or know what settings I can play with to possibly fix the synch issue?  Also, is there anyway that the game avi previews audio within the mala layout be directed to another audio output?  Other than that, I think we have this thread finished.  Thanks,

Audio sync issues are not always related to the soundcard. They can in fact be caused by settings like triplebuffer or running in ddraw mode instead of d3d. So have a play with some of those settings. Do a search on the forums for +mame +sound +stutter etc.

Latency can also depend on the soundcard your using for Mame. I'm guessing you want to use the good soundcard for your Jukebox and the onboard sound for Mame. How about try swapping them around just to see if you still get latency. That way you can rule out if it's the actual soundcard as being the issue.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #28 on: January 01, 2008, 11:12:16 am »
thanks headkaze.  I will play with those settings.  Any idea how I can make the avi previews in mala layout to direct to same audio source as mame instead of always using windows default?  I will have a go at changing windows default audio and audio output source to determine what card will function best with mame/mala.  Thanks,

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #29 on: January 01, 2008, 11:29:54 am »
thanks headkaze.  I will play with those settings.  Any idea how I can make the avi previews in mala layout to direct to same audio source as mame instead of always using windows default?  I will have a go at changing windows default audio and audio output source to determine what card will function best with mame/mala.  Thanks,

If your using ffdshow I think you can set the audio output using the "ffdshow audio decoder configuration" under the ffdshow menu in the start menu. Not sure how to go about it for other codecs.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #30 on: January 01, 2008, 12:45:42 pm »
headkaze, please see below pics.  The pics depict the options I have available to me in ffdshow and windows sound management.  I have tried all settings in ffdshow with no available luck.  Currently I have the mame.ini sound set for sounddevice 3 which is the soundblaster PCI card.  The onboard audio is sounddevice 0.  Just to keep everyone posted on the config so far.  Mame games do output correctly to the sounddevice 3 but the previews in mala want to use windows default audio, sounddevice 0. 

FFdshow does allow the game previews in mala to display correctly.  That is a good thing, right....  Would you suggest possibly getting ahold of mala developement to see if there is a setting that I could change in the GUI or ini to allow previews to output to specified audio output and or is this a limitation outside of mala? 

Headkaze, another quick question.  Noticed you may have created the chankast dreamcast emulator.  Am I correct to assume this?  Thought I read it on a forum.  Does the chankast emulator emulate gdi dreamcast games? 

Please see attached pics...  Thanks, Shane



headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #31 on: January 01, 2008, 02:37:00 pm »
Yeah it seems that option is not what your after. I don't think you can specify which soundcard you output avi audio to.

On a positive note I did find a tool called Quick Sound Switch which supports command line options. You could run this before a game or emulator to switch the primary soundcard.

Eg.
Code: [Select]
QuickSoundSwitch.exe D=Realtek HD Audio output
QuickSoundSwitch.exe D=ATI HD Audio rear output
QuickSoundSwitch.exe D=SB Live! Wave Device

I'm not a Mala user so I couldn't tell you how to launch that before a game so you might want to ask someone like loadman about that.

I'm not the author of Chankast I just wrote a wrapper for it. Check out NullDC it's a better DC emu anyway.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #32 on: January 04, 2008, 02:23:10 pm »
Hey slsimon any update on this? How is your multiple soundcard setup going?

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #33 on: January 04, 2008, 06:41:59 pm »
Hey slsimon any update on this? How is your multiple soundcard setup going?

Unfortunately, it's where it was when we last posted.  Your audio diff update is flawless.  The only problem yet to tackle is trying to get the mala screensaver and the game previews to use the same audio source.  Unless code can be updated wthin Mala, not sure if that is going to happen.  The reason I would like to have this is because I have another monitor (touchscreen) that I am planning on using as an add on to the mame cabinet, (mounted on the side).  Ideally, the best situation would be to use the windows default audio (onboard) audio for only MP3 playback.  Most if not all your MP3 jukebox players will only output to windows default.  That's why I was hoping to get all game emulation working with a separate audio output.  Now, you mentioned the quicksound switch application.  I was reading over that, but changing the windows default before application start my not work either due to not being able to listen to mp3 music while playing games. 

Do you think that swindus might be able to help out with possibly an updated feature within mala?  I can't be the only one wanting to have this functionality. 

If we can figure out how to redirect mala sound, specifically previews to another output that would be very cool.  I have been working on other aspects of the setup, specifically the layouts, gamelists, and trying to get a handful of emulators working via uncleT's how to document.  Wow, there is just so many configurations going every which way.  I will be amazed if all this comes together the way that I am expecting it to.... 

I went out of my way and bought (2) 180GB sata II drives for disk mirroring as well as (2) 750GB sata II drives for disk mirroring just so when I do get this all setup, a hardware failure will not blow me out of the water.... 

On a positive note, I just received all the electric ice buttons, cables, led boards that I will need from GGG.  Now anothe week or so and another big purchase from them, (still need the controller boards - led wiz). 

Things are coming along.  Just going to take some time. 

My guess is that a code update within Mala is going to be my best bet.  Is there a link or thread somewhere that will allow a compilation of what would be a nice feature to implement for Mala that swindus can compile together?  I guess I can email him.  What is your suggestion?

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #34 on: January 05, 2008, 12:10:33 pm »
Why not use the Quick Sound Switch software I linked to? It can change the default soundcard. So you don't even really need the diff file with that. Just run it before Mala setting the default card, then when you launch your jukebox software or Mame. Mala supports launching command line apps like that and you wont even notice it running.

Not sure about Mala being able to change the soundcard output. I guess you could try contacting Swindus but I haven't seen him around much lately.

slsimon

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
  • Last login:February 16, 2012, 11:49:12 am
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #35 on: January 05, 2008, 02:28:57 pm »
Update:

Below is the following code in a batch file that I am using for the QuickSoundSwitch application suggested by headkaze.  Mala successfuly start 16 instances :) before my computer crashes on me.  Hmmm, I am not sure what is going on here.  Any suggestions headkaze?

c:\QuickSoundSwitch.exe D=SoundBlaster Live! Wave Device V=100 R="D:\mame\game
emulation\emulators\mala\mala.exe"

Here is what I would like to see if at all possible. 

1.  Mame output to second monitor, (need to modify the mame.ini file for display switch, well I think any way)

2.  Create batch file to run QuickSoundSwitch and set default audio to SoundBlaster Live! Wave Device while implementing switch to activate mp3 playback software located in the following directory:  c:\program files\the pc jukebox\the pc jukebox.exe

3.  following quicksoundswitch.exe audio redirection to sound blaster card and after successful run of the pc jukebox, input another line in the batch file to change default soundcard back to onboard realtek card which should be windows default. 

Now, I am working on the batch file and have set the line for mala/mame to start and that works flawlessly.  Now, when I input the following line albeit to run mala and or the pc jukebox, I get around 20 instances of the program wanting to open up and have to end task/processes the quicksoundswitch.exe to be able to get my computer to respond again.  Obviously there is something going on with the quicksoundswitch executable.  Headkaze, would you like to test when time permits and see if you can duplicate? 

You do not have two soundcards but see if you can run the command with your windows defualt.  I think you may be able to duplicate the issue.   

c:\QuickSoundSwitch.exe D=SoundBlaster Live! Wave Device V=100 R="D:\mame\game
emulation\emulators\mala\mala.exe"

What is the difference between the R= and P= switches on the quicksoundswitch options? 

Thanks,


headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Audio Redirection with Mala, Microsoft Windows or Mame (DOS)
« Reply #36 on: January 17, 2012, 06:31:36 pm »
Necro'ing an old thread to post an updated patch that allows you to select the audio device MAME will output to. Thanks again to Zinky for the original patch.

I'm not sure if there is much interest in this but programs like "Quick Sound Switch" and "IndieVolume" will not work in Windows 7.

Anyway I have sent the patch off to MAMEDev and they may end up including it in the official release one day.

Once patched to 0144u6 (see Mame Compiler 64) run "mame -verbose" and it will list supported audio devices

Eg.
Code: [Select]
DirectSound: 0 = "Primary Sound Driver" (active)
DirectSound: 1 = "Logitech USB Headset"
DirectSound: 2 = "Realtek HD Audio output"

Run "mame -cc" to create a mame.ini file and set the appropriate sound device value to the one you want

Code: [Select]
#
# WINDOWS SOUND OPTIONS
#
sound_device              0

Sound should now be re-directed to that device.