Questions tagged [xaudio2]

XAudio2 is a low-level high performance audio API for Windows. It superseded DirectSound in 2008. It provides a signal processing and mixing foundation for games that is similar to its predecessors, DirectSound and XAudio.

126 questions
2
votes
1 answer

XAudio2 with C#

I am looking to replace my 32bit DirectSound audio API with XAudio2. Does XAudio2 work with a 64bit C# application? If so, I am not entirely sure how to setup the project to begin using XAudio2. All the examples I have seen online are for C++.
user2970916
  • 1,146
  • 3
  • 15
  • 37
2
votes
0 answers

Decoding and playing audio with ffmpeg and XAudio2 - frequency raito wrong

I'm using ffmpeg to decode audio and output it using the XAudio2 API, it works and plays synced with the video output using the pts. But it's high pitched (i.e. sounds like chipmunks). Setting breakpoints I can see it has sets the correct sample…
2
votes
1 answer

xAudio MasterVoice Get progress

I've been digging into xAudio recently and i failed to find some answers i need. { Not to waste your time - i need to find a way to get master voice current progress } The thing is, - SourceVoice does provide a method to give it's…
2
votes
1 answer

How to set XAudio2 dll version

My MSVC 2015 C++ application project uses xaudio2.lib. So the .cvxproj contains a line xaudio2.lib;%(AdditionalDependencies) Looking into .exe built, I can find a line XAudio2_8.dll. So it seems that…
Nick
  • 3,205
  • 9
  • 57
  • 108
2
votes
1 answer

How do you Initialize a Nonregistered COM DLL?

Recently, some of our clients lost their XAudio2_7.dll from their C:/Windows/System32 directory, and now they can't hear any audio. Reinstalling DirectX or registering the dll normally would be sufficient enough to fix this problem, but we're…
EEberhart
  • 31
  • 6
2
votes
1 answer

Stream and loop MS ADPCM (WAVE_FORMAT_ADPCM)

I'm trying to stream an MS ADPCM file using XAudio2 (in C++, but this problem doesn't appear to be language related). The file is encoded with ADPCMEncode.exe, this gives a WAV file with a format tag of WAVE_FORMAT_ADPCM. Like any stream, I create a…
subi211
  • 105
  • 2
  • 9
2
votes
2 answers

XAudio2, starting/stopping loops?

How can I start/stop audio looping in IXAudio2SourceVoice? Basically it has a start/stop which starts and pauses the audio execution as well as an ExitLoop() function which stpos the audio once it has finished playing. What I'd like to do is call…
meds
  • 21,699
  • 37
  • 163
  • 314
2
votes
1 answer

XAudio2 - playing only a part of the audio

I am trying to play mp3/wma using xaudio2. I managed to use the Media Foundation Source Reader object to do the decoding. My problem is, it is not playing the full audio; I could get only a part of the audio played. What I am trying to do is, get…
milsim
  • 35
  • 6
2
votes
1 answer

How to seek to a position in milliseconds using XAudio2

I am using the SharpDX wrapper for the DirectX XAudio2 api. http://sharpdx.org/ I need to be able to seek a WAV file loaded into a SourceVoice to a given position in the track. I am struggling to work out what I should be setting PlayBegin to in…
Tom
  • 12,591
  • 13
  • 72
  • 112
2
votes
1 answer

How to detect if another audio is playing in background? (Windows Phone 8)

One of my apps have recently failed certification because: "my app stops background music without asking user when it wants to play some music". Now the question is: how can we detect if there is any music playing in the background? PS: No XNA, or…
execomrt
  • 171
  • 2
  • 6
2
votes
0 answers

XAudio2 playing delay

I'm trying to play raw-pcm data with xaudio and i have huge delays in playing (>=5ms). I'm doing this with next code: bool Play(uint8_t *data, size_t size) { _xaudio_buffer.AudioBytes = size; _xaudio_buffer.pAudioData = data; Time t1; if…
user1266334
  • 153
  • 2
  • 12
2
votes
1 answer

XAudio2 OnVoiceProcessingPassStart callback stuttering playback

I'm using XAudio2 with SlimDX and I've managed to get it playing a short (~8second) wav file on loop, however as it approaches the end of the first loop, the audio begins to stutter and the stuttering continues into the next loop, getting worse and…
Nick Udell
  • 2,420
  • 5
  • 44
  • 83
1
vote
0 answers

Playing sound on Metro XAudio2 and windows metro throws exception

I am trying to play a pcm udp audio stream on windows8. Is there an easier way than doing xaudio2 ? I am very new to xaudio2 and creating an xaudio player is throwing an exception for me : public ref class Player sealed { public: void…
pkumar0
  • 2,069
  • 3
  • 14
  • 21
1
vote
1 answer

XAudio2 `SubmitSourceBuffer` method failed with the error code XAUDIO2_E_INVALID_CALL (0x88960001)

I'm making the pac-man with the winapi32, and using XAudio2 API for playing multiple sounds simultanueosly. I played my sound file pacman_beginning.wav, pacman_death.wav, pacman_chomp.wav, pacman_eatfruit.wav, pacman_eatghost.wav,…
tmal
  • 47
  • 6
1
vote
1 answer

How do I check/change my sound card's sample rate?

I'm playing around with XAudio2 to send PCM format waves to my soundcard, and I encountered a problem which made me think about this question. I created a .csv file with MATLAB of a sine wave at 440 Hz, and at first I had sampled it at 1 KHz (for 1…
Gabriel G. Roy
  • 2,552
  • 2
  • 27
  • 39
1
2
3
8 9