22 May '13 - 17:12 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Playback suddenly only on left speaker?  (Read 615 times)
Stefan Krupop
Guest
« on: 27 May '12 - 01:56 »
Reply with quoteQuote

Hi!

I'm using BASS in my light control software to allow creating light shows synchronized to music. BASS is responsible for playing MP3 and WAV files and returning the current position. This all works very well and I want to thank you for your work!

But...
Once in a time users report that suddenly my software does not play their music in stereo, but rather in mono, on the left speaker only!
As I am only using basic BASS functions and nothing which could change speaker assignments or balance settings I currently have no idea where this problem could come from... I was not able to reproduce the issue on my computers.
When the problem occurs it only affects my software (or maybe all programs using BASS, I do not know) and not others - so it's not the windows balance settings. Using another sound card seems to help.

Is BASS maybe storing some settings somewhere which could influence the balance and/or speaker assignments? What can I do to debug the problem?

Here's the thread and bugtracker issue where the users are complaining (sorry, German):
http://www.dmxcontrol.de/forum/index.php?page=Thread&threadID=6583
http://www.dmxcontrol.de/forum/index.php?page=Thread&threadID=2295
http://www.dmxcontrol.de/flyspray/index.php?do=details&task_id=703

Kind regards,
Stefan
Logged
Stefan Krupop
Guest
« Reply #1 on: 28 May '12 - 13:54 »
Reply with quoteQuote

It is becoming more strange...

I was playing around with the "BASSTest" Demo Project for VB6 and noticed that when executed from the Visual Basic IDE, it would only play mono. When compiled to an EXE it worked as expected and played stereo.
Then I renamed the IDE from VB6.exe to VB6_2.exe and tried again - suddenly it worked from the IDE too!
I then noticed the problem in my actual project actually occurs on my machine too (playback only on left speaker). So I took the compiled BASSTest and replaced my original EXE with it: It only played mono! Then I renamed the file and tried again: Stereo playback was working...

So it seems to me either BASS or my System (I do not want to accuse BASS) is saving some setting dependent on the filename of the EXE somewhere, which causes this behavior. Any ideas where I could find that setting?

Thank you!

Kind regards,
Stefan
Logged
Stefan Krupop
Guest
« Reply #2 on: 28 May '12 - 14:12 »
Reply with quoteQuote

Ah-ha! One step further!

I found a registry key where Windows seems to save the audio levels for different programs. It seems to me that these settings can contain some sort of balance/pan settings, even when I did not find an option in the windows audio mixer for single programs. Deleting the key instantly restored stereo playback and comparing the newly created key to the old one shows that to bytes are different. Now I just have to find out what these mean...

Here's the path to the key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore\<Key for the program in question>

Regards,
Stefan
Logged
Ian @ un4seen
Administrator
Posts: 15266


« Reply #3 on: 28 May '12 - 16:43 »
Reply with quoteQuote

That's very strange. BASS doesn't touch the registry itself, so I can only assume that something else is doing that, but I can't think of what or why that might be. Were there any special steps that you took to get the problem to occur? Are you able to get it to happen with any of the pre-compiled BASS examples (in C\BIN) without first renaming them to another EXE filename that the problem has already affected?
Logged
Stefan Krupop
Guest
« Reply #4 on: 28 May '12 - 21:51 »
Reply with quoteQuote

Thank you for your reply!

After some more investigation I discovered that the original change of the registry setting is not caused by BASS, but rather by the Mabry MIDI I/O contol I'm using. When it opens the MIDI port of the soundcard, the registry setting changes to the problematic value.
I still have to figure out why that happens and how to solve the problem, but that is no problem for this forum anymore. Smiley

Sorry for blaming the wrong component!

Kind regards,
Stefan
Logged
Stefan Krupop
Guest
« Reply #5 on: 28 May '12 - 23:37 »
Reply with quoteQuote

Just for the records:
The root cause was indeed in the Mabry MIDI control (which I have a quite old version of), which called midiOutSetVolume with a value of 0x0000FFFF which sets the volume of the right speaker to zero. This somehow caused the whole audio output for that application to be muted on the right channel.
I fixed the problem by patching the control to remove the "value & 0xffff", causing the call to use the correct 0xFFFFFFFF. Using the newest (open-source) version of the control should also work, as the problematic code is commented out in newer versions.

Kind regards,
Stefan
Logged
Ian @ un4seen
Administrator
Posts: 15266


« Reply #6 on: 29 May '12 - 13:23 »
Reply with quoteQuote

Good to hear that you found the culprit, and it wasn't BASS Smiley
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines