3DSound in the game engine is allways stereo #38188

Closed
opened 2014-01-13 12:01:09 +01:00 by Bernd Günther · 49 comments

System Information
Windows 8.1 with amd radeon 6900

Blender Version
Broken: 2.69.0 r60995

Short description of error
I developed a little game scene for the calibration of my 5.1 Surrond home theatre system. I created a sphere with a sound Actuator on it and some simple keyboard logic for the movement of the camera. In the "user preferences" under "system" I set OPENAL with 5.1 surround and under scene I set "audio 5.1 Surround". What I expect is when moving the camera the sound moves according to the position of the sphere. But this is only true for the front speakers, but not for the center and the read speakers. So I came to the conclusion, that for some reason only stereo is active.

When using the build in pyhon aud module, the device.cannels allways reports 2 channels despite of what is configured in the user preferences or the scene parameters.

Exact steps for others to reproduce the error
See attached .blend file{F67717}, press "P". You need a valid surround system connected to your computer

**System Information** Windows 8.1 with amd radeon 6900 **Blender Version** Broken: 2.69.0 r60995 **Short description of error** I developed a little game scene for the calibration of my 5.1 Surrond home theatre system. I created a sphere with a sound Actuator on it and some simple keyboard logic for the movement of the camera. In the "user preferences" under "system" I set OPENAL with 5.1 surround and under scene I set "audio 5.1 Surround". What I expect is when moving the camera the sound moves according to the position of the sphere. But this is only true for the front speakers, but not for the center and the read speakers. So I came to the conclusion, that for some reason only stereo is active. When using the build in pyhon aud module, the device.cannels allways reports 2 channels despite of what is configured in the user preferences or the scene parameters. **Exact steps for others to reproduce the error** See attached .blend file{[F67717](https://archive.blender.org/developer/F67717/GameDemo.blend)}, press "P". You need a valid surround system connected to your computer
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bguenthe

Added subscriber: @bguenthe
Joerg Mueller was assigned by Brecht Van Lommel 2014-01-13 23:42:26 +01:00
Joerg Mueller removed their assignment 2014-01-14 00:35:30 +01:00
Thomas Dinges was assigned by Joerg Mueller 2014-01-14 00:35:30 +01:00
Member

Added subscriber: @neXyon

Added subscriber: @neXyon
Member

This is a problem with the windows OpenAL library, I don't know which one is being used right now, maybe the windows plattform devs can help out?

If OpenAL soft is used, you should create the necessary configuration file .alsoftrc and configure 5.1 audio in there, like this:

[general]
channels = surround51

but I don't know where this file has to be placed for windows, on linux it's simply in my home directory.

This is a problem with the windows OpenAL library, I don't know which one is being used right now, maybe the windows plattform devs can help out? If OpenAL soft is used, you should create the necessary configuration file .alsoftrc and configure 5.1 audio in there, like this: [general] channels = surround51 but I don't know where this file has to be placed for windows, on linux it's simply in my home directory.
Author

Hi,

I've tried the usual places in Windows like windows_user_home, blend_file_root, blender_root, windows_root, windows_root\system32, but without success.

And why have I use a config file? Everythink is configured in user preferences "system" panel in blender.

Kind regards,

Bernd

Hi, I've tried the usual places in Windows like windows_user_home, blend_file_root, blender_root, windows_root, windows_root\system32, but without success. And why have I use a config file? Everythink is configured in user preferences "system" panel in blender. Kind regards, Bernd
Thomas Dinges removed their assignment 2014-02-21 16:42:01 +01:00

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Can confirm the issue with vc2008 and vc2013 build, only stereo.

I am not familiar with Sound nor Game Engine though, so I leave this to someone else.

Can confirm the issue with vc2008 and vc2013 build, only stereo. I am not familiar with Sound nor Game Engine though, so I leave this to someone else.
Member

OK, I asked the OpenAL soft developer now, the file should be here: %AppData%\alsoft.ini could you please try that @ThomasDinges? Contents are as above:


[general]
channels = surround51

and then it should work with 5.1 surround sound.

Regards

OK, I asked the OpenAL soft developer now, the file should be here: **%AppData%\alsoft.ini** could you please try that @ThomasDinges? Contents are as above: ``` [general] channels = surround51 ``` and then it should work with 5.1 surround sound. Regards
Author

I created a file named alsoft.ini in my %appdata% directory, restarted windows and blender but without success. It is still only stereo

Regards

I created a file named alsoft.ini in my %appdata% directory, restarted windows and blender but without success. It is still only stereo Regards

Added subscriber: @JurgenHerrmann

Added subscriber: @JurgenHerrmann

Could you please try the following steps:

  1. Locate the appropriate OpeanAl.DLL and wrap_oal.dll in your Windows/System32 (or SysWOW64)
  2. Replace the dll files in your Blender directory with these files
  3. Test again ;)
Could you please try the following steps: 1. Locate the appropriate OpeanAl.DLL and wrap_oal.dll in your Windows/System32 (or SysWOW64) 2. Replace the dll files in your Blender directory with these files 3. Test again ;)
Author

@JurgenHerrmann: Thank you for your advice

  1. ok
  2. ok
  3. Test again. No, it is stereo
@JurgenHerrmann: Thank you for your advice 1. ok 2. ok 3. Test again. No, it is stereo
Member

Ok, seems like we don't have OpenAL soft for windows. Try setting up the OpenAL.dll from OpenAL soft, which you can download here: http://kcat.strangesoft.net/openal-soft-1.15.1-bin.zip

Just follow the readme.txt with renaming the dll accordingly and place it in your blender directory instead of the system32 directory. Note that you should also have the configuration file from above!

Ok, seems like we don't have OpenAL soft for windows. Try setting up the OpenAL.dll from OpenAL soft, which you can download here: http://kcat.strangesoft.net/openal-soft-1.15.1-bin.zip Just follow the readme.txt with renaming the dll accordingly and place it in your blender directory instead of the system32 directory. Note that you should also have the configuration file from above!
Author

Hi,

I have downloaded the openal-soft, extracted the 64bit version of the soft_oal.dll renamed it to OpenAL32.dll and put it in the blender directory. I have restored the wrap_oal.dll with the original blender version and did the test again. The configuration file alsoft.ini in the %appdata% directory is still present and configured to
[general]
channels = surround51

Sorry, but it is still only stereo. No sound to my rear speakers.

Regards

Bernd

Hi, I have downloaded the openal-soft, extracted the 64bit version of the soft_oal.dll renamed it to OpenAL32.dll and put it in the blender directory. I have restored the wrap_oal.dll with the original blender version and did the test again. The configuration file alsoft.ini in the %appdata% directory is still present and configured to [general] channels = surround51 Sorry, but it is still only stereo. No sound to my rear speakers. Regards Bernd
Juergen Herrmann self-assigned this 2014-02-26 19:40:14 +01:00

Alright, I got a 5.1 System from a friend. I'll try to setup and debug our Soundsystem this weekend.

Alright, I got a 5.1 System from a friend. I'll try to setup and debug our Soundsystem this weekend.
Author

Hi,

great!

May I suggest that the manual creation of a configuration file (alsoft.ini) is not the best way to enable the 5.1 sound. I think the configuration of the sound system has to be inside blender. I would prefer to set it in the user preferences system panel under OpenAL, instead in a separate file.

Regards

Bernd

Hi, great! May I suggest that the manual creation of a configuration file (alsoft.ini) is not the best way to enable the 5.1 sound. I think the configuration of the sound system has to be inside blender. I would prefer to set it in the user preferences system panel under OpenAL, instead in a separate file. Regards Bernd
Member

Well you cannot set the amount of channels/speakers with the OpenAL API, so the setting in the user preferences is basically useless for OpenAL. Writing that file would be OpenAL soft specific, something we really shouldn't do, especially when other applications use OpenAL soft! Also we don't ship OpenAL soft with the windows version of blender. I just hope that we get a GSoC student for audio this year who could write a backend for windows.

Well you cannot set the amount of channels/speakers with the OpenAL API, so the setting in the user preferences is basically useless for OpenAL. Writing that file would be OpenAL soft specific, something we really shouldn't do, especially when other applications use OpenAL soft! Also we don't ship OpenAL soft with the windows version of blender. I just hope that we get a GSoC student for audio this year who could write a backend for windows.
Author

Hi,

ok thank you for this information. I can live with the external file, no problem :-). Sadly I'm not skilled enougth to do it.

Regrads

Bernd

Hi, ok thank you for this information. I can live with the external file, no problem :-). Sadly I'm not skilled enougth to do it. Regrads Bernd

I just did a quick test with your blend file on my Windows 8.1 System using a sundblaster x-fi and a creative 5.1 Sound System.
After I found out how to configure the Windows Settings to enable the 5.1 Output your blend file worked well. I had clean surround Sound.
Are you sure your System config is correct?
I'll try out with different library configs now ;)

Could you please describe your audio setup? I can't find any problem on my dev System everything works fine on VS2013 and VS2008 builds of blender.

Did you tell your Windows that you have a surround System attached?

I just did a quick test with your blend file on my Windows 8.1 System using a sundblaster x-fi and a creative 5.1 Sound System. After I found out how to configure the Windows Settings to enable the 5.1 Output your blend file worked well. I had clean surround Sound. Are you sure your System config is correct? I'll try out with different library configs now ;) Could you please describe your audio setup? I can't find any problem on my dev System everything works fine on VS2013 and VS2008 builds of blender. Did you tell your Windows that you have a surround System attached?
Author

I checked everything again. I have also a soundblaster X-Fi with windows 8.1. I did the test in the windows sound panel. You can click on every speaker separately and every speaker is perfectly hearable. I also tried Half Live 2 with a perfect surrond sound.

Currently I have two headphones connected. One for the front speaker and one for the rear speaker. The rear speaker is allways silent in blender. I tired it also on my surrond sytem in my living room. In this case everythin is connected via a hdmi cable.

I guess the alsoft.ini is not recognized by the openal system.

I checked everything again. I have also a soundblaster X-Fi with windows 8.1. I did the test in the windows sound panel. You can click on every speaker separately and every speaker is perfectly hearable. I also tried Half Live 2 with a perfect surrond sound. Currently I have two headphones connected. One for the front speaker and one for the rear speaker. The rear speaker is allways silent in blender. I tired it also on my surrond sytem in my living room. In this case everythin is connected via a hdmi cable. I guess the alsoft.ini is not recognized by the openal system.

Added subscriber: @karja

Added subscriber: @karja

I have downloaded the openal-soft, extracted the 64bit version of the soft_oal.dll renamed it to OpenAL32.dll and put it in the blender directory. I have restored the wrap_oal.dll with the original blender version and did the test again.

Maybe i misunderstand it here, but shouldnt you rename soft_oal.dll to wrap_oal.dll and replace the old wrap with this renamed one?

>I have downloaded the openal-soft, extracted the 64bit version of the soft_oal.dll renamed it to OpenAL32.dll and put it in the blender directory. I have restored the wrap_oal.dll with the original blender version and did the test again. Maybe i misunderstand it here, but shouldnt you rename soft_oal.dll to wrap_oal.dll and replace the old wrap with this renamed one?
Author

Here is the extract of the readme file that belongs to the openal-soft binary distribution:

"then rename soft_oal.dll to OpenAL32.dll (note: even the 64-bit DLL should be
named OpenAL32.dll)"

I placed the libraries in the blender folder.

Here is the extract of the readme file that belongs to the openal-soft binary distribution: "then rename soft_oal.dll to OpenAL32.dll (note: even the 64-bit DLL should be named OpenAL32.dll)" I placed the libraries in the blender folder.
Author

Hi,

ok, got it. It's a problem with blender compiled with the mingw64 compiler. I downloaded the blender 2.7 early access both vc2008 and mingw, but only the vc2008 works as expected. There is a lot of disturbing noise when the sphere passes the speakers, but is is truly surrond sound :-) The OpenAL32.dll library ist 504 kb large. In the mingw64 build of blender it is 97 kb and I have only stereo.

My blender 2.69 has also the small library so I guess it it mingw64 compiled. And so I have only stereo.

What I do not understand. For testing purposes I removed the alsoft.ini, but I have still surrond sound.

Hi, ok, got it. It's a problem with blender compiled with the mingw64 compiler. I downloaded the blender 2.7 early access both vc2008 and mingw, but only the vc2008 works as expected. There is a lot of disturbing noise when the sphere passes the speakers, but is is truly surrond sound :-) The OpenAL32.dll library ist 504 kb large. In the mingw64 build of blender it is 97 kb and I have only stereo. My blender 2.69 has also the small library so I guess it it mingw64 compiled. And so I have only stereo. What I do not understand. For testing purposes I removed the alsoft.ini, but I have still surrond sound.

This seems to be a pure MinGW problem. I could not reproduce this with VS20XX builds at all.
I don't have a MinGW dev environment ready here, so someone else should have a look at this.

This seems to be a pure MinGW problem. I could not reproduce this with VS20XX builds at all. I don't have a MinGW dev environment ready here, so someone else should have a look at this.
Juergen Herrmann removed their assignment 2014-03-02 13:13:18 +01:00
Nobody was assigned by Juergen Herrmann 2014-03-02 13:13:18 +01:00

Added subscriber: @Moguri

Added subscriber: @Moguri

So, is this really a game engine issue still? Seems like a build issue.

So, is this really a game engine issue still? Seems like a build issue.
Member

From the comments it seems that the library in

https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64/openal/lib/

is the reason for this, as this is the 97 kB library that is used for mingw64 builds. It has to be updated, maybe someone could try building with mingw64 but replacing the library from one of the win64_vc* folders first?

From the comments it seems that the library in https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64/openal/lib/ is the reason for this, as this is the 97 kB library that is used for mingw64 builds. It has to be updated, maybe someone could try building with mingw64 but replacing the library from one of the win64_vc* folders first?
Author

just checked it with the new vc2013 (not official) builds. ups, there is now "no sound". seems to be a different problem :-(

but I found out the following:
I have a new notebook. I copied the eary access 2.7 build (look at my post from Mar 2 2014, 7:04 AM) from my desktop machine to this new notebook. I connected the new notebook to my surround system and I tried my soundtest with the early access build. Hey, everyting is fine! 5.1 surround sound is working!

So, the openal32.dll in the early access build (vc2008) is fine. I don't need to download openal32.dll from the official source and I don't need to create and configure the alsoft.ini in my %appdata% directory

Hope that helps

just checked it with the new vc2013 (not official) builds. ups, there is now "no sound". seems to be a different problem :-( but I found out the following: I have a new notebook. I copied the eary access 2.7 build (look at my post from Mar 2 2014, 7:04 AM) from my desktop machine to this new notebook. I connected the new notebook to my surround system and I tried my soundtest with the early access build. Hey, everyting is fine! 5.1 surround sound is working! So, the openal32.dll in the early access build (vc2008) is fine. I don't need to download openal32.dll from the official source and I don't need to create and configure the alsoft.ini in my %appdata% directory Hope that helps
Member

Added subscriber: @brita

Added subscriber: @brita
Member

@neXyon what is the status on this one?

@neXyon what is the status on this one?
Member

My last comment is still valid. I'm waiting for someone with windows to be as kind as to fix/test this.

I hope it's enough to replace the https:*svn.blender.org/svnroot/bf-blender/trunk/lib/win64/openal/ contents with the ones from https:*svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc12/openal/ to fix this. We would just need someone to test this with mingw64 and vc9/11/whateverelsewehave.

My last comment is still valid. I'm waiting for someone with windows to be as kind as to fix/test this. I hope it's enough to replace the https:*svn.blender.org/svnroot/bf-blender/trunk/lib/win64/openal/ contents with the ones from https:*svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc12/openal/ to fix this. We would just need someone to test this with mingw64 and vc9/11/whateverelsewehave.
Author

I have Windows and I have some developing skills. I build blender for Windows one year or so on my machine. But I remenber that is was not easy. Unfortunately I forgot everything about it. Is there an easy way to build blender? Is there a good explanation? If so, II can try do check the replacenmant of the library.

I have Windows and I have some developing skills. I build blender for Windows one year or so on my machine. But I remenber that is was not easy. Unfortunately I forgot everything about it. Is there an easy way to build blender? Is there a good explanation? If so, II can try do check the replacenmant of the library.
Author

ok, I think I misunderstood it. @neXyon: I think you mean to copy the files not to muild blender from scatch.

But I found out how to build blender. I use VC 2013 and scons and it was a peace of cake. I have no time today, but will test, if it works tomorrow!

ok, I think I misunderstood it. @neXyon: I think you mean to copy the files not to muild blender from scatch. But I found out how to build blender. I use VC 2013 and scons and it was a peace of cake. I have no time today, but will test, if it works tomorrow!
Author

Hmm, new bug! No sound at all in the 2.71 build.

Hmm, new bug! No sound at all in the 2.71 build.
Member

Adding the Windows platform category to see if they can help test.
@bguenthe please make new reports for new bugs

Adding the Windows platform category to see if they can help test. @bguenthe please make new reports for new bugs
Author

Pleae refer to my post from Mar 2 2014:

"ok, got it. It's a problem with blender compiled with the mingw64 compiler. I downloaded the blender 2.7 early access both vc2008 and mingw, but only the vc2008 works as expected. There is a lot of disturbing noise when the sphere passes the speakers, but is is truly surrond sound :-) The OpenAL32.dll library ist 504 kb large. In the mingw64 build of blender it is 97 kb and I have only stereo"

It worked only once with the blender 64 vc2008 early access build. I want to try it again, but I did not find this build anymore. The file size of the OpenAL32.dll is quite larger than the current library. I have no success with the windows vc2013 builds

Pleae refer to my post from Mar 2 2014: "ok, got it. It's a problem with blender compiled with the mingw64 compiler. I downloaded the blender 2.7 early access both vc2008 and mingw, but only the vc2008 works as expected. There is a lot of disturbing noise when the sphere passes the speakers, but is is truly surrond sound :-) The OpenAL32.dll library ist 504 kb large. In the mingw64 build of blender it is 97 kb and I have only stereo" It worked only once with the blender 64 vc2008 early access build. I want to try it again, but I did not find this build anymore. The file size of the OpenAL32.dll is quite larger than the current library. I have no success with the windows vc2013 builds
Member

I think vc2008 support was dropped? I am not sure about windows stuff..

I think vc2008 support was dropped? I am not sure about windows stuff..

Yes, vc2008 is deprecated, and will be fully dropped soon.

Yes, vc2008 is deprecated, and will be fully dropped soon.

Any news on building/finding new OpenAL libs for Windows builds? I'm guessing we can't just use the vc2008 libs for vc2013 (this sometimes, but rarely, works)?

Any news on building/finding new OpenAL libs for Windows builds? I'm guessing we can't just use the vc2008 libs for vc2013 (this sometimes, but rarely, works)?
Member

No news obviously. It would be nice if someone with windows and vc2013 could simply try this out and comment with results here.

No news obviously. It would be nice if someone with windows and vc2013 could simply try this out and comment with results here.
Member

Added subscriber: @MartijnBerger

Added subscriber: @MartijnBerger
Member

There might be hope for openal-soft

0051a96376

There might be hope for openal-soft http://repo.or.cz/w/openal-soft.git/commit/0051a9637644795c721945faf64f9917ec5aa788
Member

Well as long as we don't use openal soft, that won't happen for windows. The question is if it's the fault of the OpenAL libraries we're using, why not these: http://openal.org/creative-installers/

Well as long as we don't use openal soft, that won't happen for windows. The question is if it's the fault of the OpenAL libraries we're using, why not these: http://openal.org/creative-installers/
Author

Hi,

Just found this: http:*kcat.strangesoft.net/openal.html#download. I loaded http:*kcat.strangesoft.net/openal-soft-1.16.0-bin.zip.

I extracted the soft_oal.dll and I replaced both the blender OpenAL32.dll AND wrap_oal.dll (blender 64 2.72b) with the soft_oal.dll. The file size is 779 kb. In the build of openal-soft is an configuration program included. It's in the folder alsoft-config named alsoft-config.exe. I configured openal to surround51 and hurray, it works!

My demo-scene is truely 5.1 surround sound witout glitches!

So why do not include the libraries to the next blender release?

Regards

Bernd

Hi, Just found this: http:*kcat.strangesoft.net/openal.html#download. I loaded http:*kcat.strangesoft.net/openal-soft-1.16.0-bin.zip. I extracted the soft_oal.dll and I replaced both the blender OpenAL32.dll AND wrap_oal.dll (blender 64 2.72b) with the soft_oal.dll. The file size is 779 kb. In the build of openal-soft is an configuration program included. It's in the folder alsoft-config named alsoft-config.exe. I configured openal to surround51 and hurray, it works! My demo-scene is truely 5.1 surround sound witout glitches! So why do not include the libraries to the next blender release? Regards Bernd
Member

I can confirm your observations about openal-soft

I can confirm your observations about openal-soft
Member

Can you retry with current cmake buildbot or tomorrows general buildbot and see if this is fixed ?

Can you retry with current cmake buildbot or tomorrows general buildbot and see if this is fixed ?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

I can confirm that this works now, tested with todays Buildbot build and a 5.1 system on Windows 7 x64.

I can confirm that this works now, tested with todays Buildbot build and a 5.1 system on Windows 7 x64.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#38188
No description provided.