Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Windows 8.1. Can't create MasteringVoice object #269

Closed
rumyancevpavel opened this issue Feb 5, 2014 · 7 comments
Closed

Windows 8.1. Can't create MasteringVoice object #269

rumyancevpavel opened this issue Feb 5, 2014 · 7 comments

Comments

@rumyancevpavel
Copy link

The following code works perfect on Windows 8, but in Windows 8.1 it throws exception (see attached image):

internal class DxSoundManager
{
public DxSoundManager
{
Engine = new XAudio2();
MasteringVoice = new MasteringVoice(Engine)
}

private XAudio2 Engine;
private MasteringVoice MasteringVoice;
}

untitled

@xoofx
Copy link
Member

xoofx commented Feb 5, 2014

Are you using latest dev package with DirectX11_2-winrt assemblies? (Which are only compatible with Windows 8.1)

@rumyancevpavel
Copy link
Author

I'm using SharpDX.dll version 2.5.1.0 and SharpDX.XAudio2.dll version 2.5.1.0 (from latest dev-package 2.5.1, from DirectX11_2-Signed-winrt folder)

@xoofx
Copy link
Member

xoofx commented Feb 5, 2014

Ok, but is it from Bin\DirectX11_2-winrt directory?

@rumyancevpavel
Copy link
Author

i took it from DirectX11_2-Signed-winrt folder

@ArtiomCiumac
Copy link
Contributor

@rumyancevpavel,
I get the same error if there are no active audio devices in system (for example you are connected via Remote Desktop with Audio disabled).
Please check if you have an active audio device and let us know if this solves the issue.

@JerryLive
Copy link

I am using Win 8.1 and have no issues creating and using the MasteringVoice.

Public Class Audio3D_Class
'XAudio2 uses volumes from 0f to 1f, and Pan from -1f to 1f with 0f at center.
'All Sounds are 44.1Khz, 16bit, Mono, with stereo output.
'Device and MasteringVoice.
Private XAdevice As XAudio2
Private MasterVoice As MasteringVoice
'Constructor.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Sub New()
XAdevice = New XAudio2()
MasterVoice = New MasteringVoice(XAdevice, 2, 44100)
CreateActions()
End Sub
.......
End Class

@rumyancevpavel
Copy link
Author

@ArtiomCiumac, yes, it seems that You right. I trying to run my code in Virtual Machine with no audio device. Thanks.

r2d2rigo pushed a commit to r2d2rigo/SharpDX that referenced this issue Jul 24, 2014
…ould be fired. Add MediaEngineApp sample on Dekstop.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants