Comments (7)
What's the XNA4 behavior when no audio device exists? Does it just roll without audio, or does it throw a NoAudioHardwareException?
If the latter, we need to throw this Exception when we hit this error. (Also, I'm going to take a wild guess and say this is a test best done in VirtualBox?)
from fna-mghistory.
I'm not sure how to find what the XNA4 behavior is, short of getting my project to compile with XNA4 (quick googling didn't come up with any explanation of what XNA4 does with no audio). Is that the right way to find out?
The instance of this crash that I had was just on Ubuntu 14 dual-booted on a Dell, not VirtualBox (if that's what you were asking).
from fna-mghistory.
My recommendation would be to get a really bad VM with Windows on it (ensuring that no audio hardware is enabled), throw a bare-bones XNA4 project on it, and run it. That should throw out this Exception, assuming that a NoSuitableGraphicsDeviceFoundException doesn't come first.
from fna-mghistory.
The audio on that computer works fine in Windows... so I disabled all audio hardware devices (which I hope gives a comparable state), then ran a basic XNA4 project. There were no exceptions thrown, and the little app ran fine.
So does that mean that disabling the audio hardware is not the same situation? It seems unlikely that XNA4 would just quietly ignore the issue w/o even an exception?
from fna-mghistory.
The way I understand it, both XAudio2 and OpenAL enumerate whatever hardware's available, doesn't matter if it's muted/disabled or not. My guess is, the FNA app works there too.
The question is, should we just throw the NoAudioHardwareException for this situation so we know what to do here, or do we go through every single line in the audio subsystem to account for no sound device, if it turns out that XNA is willing to play both SoundEffect and XACT data even when no audio hardware is recognized by Windows?
For me it's hard to muster up the time for this, as I generally expect that people will have a sound card when running a game. (To be honest I'm surprised ALSA doesn't see anything on that PC, what audio hardware is this...?)
from fna-mghistory.
Ok! I looked into it and if you don't have any usable hardware on in a straight XNA game, you get a NoAudioHardwareException when you call Content.Load<SoundEffect>(). I've reworked the OpenAL stuff a bit to remove the vanilla Exception's from the OpenALDevice constructor and in SoundEffect.INTERNAL_bufferData I added a check after AL.GenBuffer() to see if we are getting a non-zero buffer back. If we aren't, I throw the NoAudioHardwareException. It now seems to mimic the XNA behavior as far as I can tell. Kosher? I'll check this in as yet another changeset if you think it will fly.
from fna-mghistory.
Think we got this one!
from fna-mghistory.
Related Issues (20)
- shader normalmap not work HOT 3
- Can't run on machine without audio device HOT 9
- [OpenGL] VMware/VBox Support? HOT 7
- [MojoShader] MOJOSHADER_glSetVertexAttribDivisor causes 'System.AccessViolationException' on some computers HOT 3
- [Keyboard] Proposal for Keyboard.GetLayoutEXT() HOT 1
- Microsoft.Xna.Framework.Input.GamePad.INTERNAL_AddInstance throws "An element with the same key already exists in the dictionary" HOT 2
- Triangle color is wrong with fairly simple shader + access violation exception HOT 7
- Unable to load a texture (.PNG) from stream HOT 9
- Initialization order mishap HOT 3
- GraphicsDeviceManager never set in Game HOT 1
- GL Object Disposal Wrappers are not thread-safe HOT 3
- DynamicSoundEffectInstance behavior incompatible with XNA4 HOT 8
- OpenGL 3.2+ Core Profile support HOT 4
- Starting game in full screen bug HOT 8
- Null reference when disposing sound effect after checking sound device exists HOT 5
- [QUESTIONS] learning, using FNA HOT 3
- More spec-compliant Touch Support HOT 34
- FNA Binary Release HOT 1
- RasterizerState.MultiSampleAntiAlias not implemented HOT 8
- Set Render Target to Another Window HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fna-mghistory.