Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to specify the midi output devise #1728

Closed
DorpsGek opened this issue Jan 30, 2008 · 16 comments
Closed

Need to specify the midi output devise #1728

DorpsGek opened this issue Jan 30, 2008 · 16 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Sjoerd_NLD opened the ticket and wrote:

Hello,

I wanted to adjust the volume of the music, I moved the slider to the left but no change in volume.
The volume of the sound effects does work.
I think this is a bug.
I'm using 0.6.0.b3 on windows, I have a Creative SB Audigy soundcard (VEN:1102 DEV:0004).

Thanks

Reported version: 0.6.0-beta3
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/1728
@DorpsGek
Copy link
Member Author

Belugas wrote:

Just tested it, on WinXP. I have an onboard no fancy no thrill audio card.
It works flawlessly.
I can turn volume of music up or down right from the application.
Same as sound effects.
I have no clue why you have this behaviour.
Can you at least shut the music up?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3408

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2008

Belugas wrote:

Do you have any other program apart OpenTTD that runs midi files? And which that you can change volume?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3419

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2008

glx wrote:

What music driver is actually used? Run "openttd -d driver1" to determine it.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3425

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 5, 2008

Sjoerd_NLD wrote:

I will run openttd -d driver1 later this week.

I use the latest webrelease of the SB Audigy driver found on creative.com, I can stop the music with the stop button and resume with play. The volume slider has no effect, the effects slider is working.

As far as I know I have no other midi software enabled.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3462

@DorpsGek
Copy link
Member Author

Belugas wrote:

Sjoerd, do you have any news for us regarding your "-d driver1" test?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3527

@DorpsGek
Copy link
Member Author

Sjoerd_NLD wrote:

Hello guys,

This is the output of openttd -d driver1:

dbg: [driver] Successfully probed blitter '8bpp-optimized'
dbg: [driver] Loading drivers...
dbg: [driver] Successfully probed sound driver 'win32'
dbg: [driver] Successfully probed music driver 'dmusic'
dbg: [driver] Successfully probed video driver 'win32'

I used openttd 0.6.0-beta4

I have tested the following:
I started the game, loaded a save, started the music.
Then I used the windows key to return to the desktop, I opened the sound controls and moved the midi synth slider. That does work strangely.

I will search another driver for testing and report back here.

Sjoerd


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3548

@DorpsGek
Copy link
Member Author

glx wrote:

There are 3 drivers for music: dmusic, win32 and null (which does nothing ;)). You can select the one to use with "openttd -m music_driver_name"


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3550

@DorpsGek
Copy link
Member Author

Sjoerd_NLD wrote:

Hello

I tried both dmusic and win32, no change.
I also updated the driver from creative to the latest version, no change.

When I look in dxdiag it says that the "SB Audigy DirectMusic-synthesizer [E400]" is default and that it supports DLS.

Sjoerd


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3552

@DorpsGek
Copy link
Member Author

glx wrote:

That's strange as dmusic driver asks directmusic directly.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3553

@DorpsGek
Copy link
Member Author

Sjoerd_NLD wrote:

Can I debug that somehow?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3554

@DorpsGek
Copy link
Member Author

Sjoerd_NLD wrote:

I found the problem, it's the creative card.
I tried another pc with a Creative SB Live!-audio [E880] card, same problem!
Then I removed the card and enabled the standard onboard card, SoundMax HD audio, then it works.
Then I started dxdiag and found that the default midi device is the "Microsoft Synthesizer".

So to reproduce this error, you need a creative audio card like the Live or Audigy.

Is there a way to set the "Microsoft Synthesizer" as default when starting the game?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3559

@DorpsGek
Copy link
Member Author

Belugas wrote:

TO be honest, i really do not know.
But since it is confirmed that this is not a OpenTTD bug, i change it to Feature Request.
Maybe we'll find a way to do so
Thanks ofr your efforts :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3560

@DorpsGek
Copy link
Member Author

Sjoerd_NLD wrote:

I found a way for changing the volume that works on all systems I have at home.
In the dmusic.cpp file, change the SetVolume function into this:

void MusicDriver_DMusic::SetVolume(byte vol)
{
long lVolume = vol * 2000 / 127 - 2000; ///< 0 - 127 -> -2000 - 0
IDirectMusicAudioPath *pDirectMusicAudioPath;
IDirectSoundBuffer *pDirectSoundBuffer;
DWORD dwBuffer = 0;

pDirectMusicAudioPath = m_pMusicManager->GetDefaultAudioPath();

if(pDirectMusicAudioPath==NULL)
return;

if (S_OK != pDirectMusicAudioPath->GetObjectInPath( DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, dwBuffer,
GUID_NULL, 0, IID_IDirectSoundBuffer, (void**) &pDirectSoundBuffer))
return;

if(FAILED(pDirectSoundBuffer->SetVolume(lVolume)))
return;
}

I build this using BuildOTTD and tested it on 3 systems, works fine.
I copied the code from this tutorial: http://www.techsnippets.com/?page_id=29

Sjoerd


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3577

@DorpsGek
Copy link
Member Author

glx wrote:

BuildOTTD doesn't use directmusic , so you couldn't see that your change fails to compile.
But that shows one thing: win32 driver works correctly :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3578

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 1, 2008

Sjoerd_NLD wrote:

Jep you're right, I have tested that with the -d switch, shows win32 as driver.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728#comment3586

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Flyspray clean up: more than 5 years old, and not obvious what should be done with this next, so closing. If this offends, discuss with andythenorth in irc. Thanks.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1728

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant