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
14
votes
1 answer

Need Resources on XAPO Effects for XAudio2

I've been working with XAudio2 lately. After going over the samples, example code, and more-sparse-than-I'd-like documentation available from Microsoft and the MSDN, I've found that there aren't any easy-to-Google resources on creating and using…
Jason Champion
  • 2,670
  • 4
  • 35
  • 55
6
votes
2 answers

Playing sinus through XAudio2

I'm making an audio player using XAudio2. We are streaming data in packets of 640 bytes, at a sample rate of 8000Hz and sample depth of 16 bytes. We are using SlimDX to access XAudio2. But when playing sound, we are noticing that the sound quality…
AkselK
  • 2,563
  • 21
  • 39
5
votes
2 answers

Play a single note with DirectMusic

I'm using DirectMusic for MIDI playback in an application I'm developing. Does anyone know if it's possible to use DirectMusic to play individual notes? Currently, I'm converting an in-memory data structure that represents entire 'songs' into a MIDI…
Rob
  • 25,984
  • 32
  • 109
  • 155
5
votes
2 answers

Building with XAudio2 on Windows 7

I'm trying to use the following instructions to build some code that uses XAudio2 and runs on Windows 7: http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275%28v=vs.85%29.aspx As suggested, I'm including the XAudio2.h from the DirectX…
Tom Seddon
  • 2,648
  • 1
  • 19
  • 28
5
votes
2 answers

Displaying a video in DirectX

What is the best/easiest way to display a video (with sound!) in an application using XAudio2 and Direct3D9/10? At the very least it needs to be able to stream potentially larger videos, and take care of the fact that the windows aspect ratio may…
Fire Lancer
  • 29,364
  • 31
  • 116
  • 182
4
votes
0 answers

XAudio2 - Source voice hangs when active audio device gets removed

I have a problem I am not able to solve. My application should be able to switch the default audio device during runtime. To achieve this I am using XAudio2 from the DirectXTK. I implemented the IMMNotificationClient into my audio class to be able…
datoml
  • 5,554
  • 4
  • 21
  • 28
4
votes
3 answers

XAudio2 - Play generated sine, when changing frequency clicking sound

I want to develop an app to match your tinnitus frequency : A frequency is played and the user decrease or increase the freqency by pressing a plus or minus button. (see part of the codes, based on some coding from stackoverflow thx :-)) public…
c0ldsun
  • 55
  • 3
3
votes
1 answer

How to play same sound repeatedly with XAudio2?

I need to play single sound repeatedly in my app, for example, a gunshot, using XAudio2. This is the part of the code I wrote for that purpose: public sealed class X2SoundPlayer : IDisposable { private readonly WaveStream _stream; …
Alex
  • 923
  • 9
  • 21
3
votes
1 answer

Strange File Not Found errors with mmioOpen

Ive been playing around with XAudio2 but have encountered some strange problems with the mmioOpen function For some reason it seems to fail with MMIOERR_FILENOTFOUND, even though the file is there, in fact the file is in the same directory as other…
Fire Lancer
  • 29,364
  • 31
  • 116
  • 182
3
votes
3 answers

error C2146: syntax error : missing ';' before identifier 'ContextRecord'

i have a header file which contained all of the class' functions including code so the class didn't have a cpp file. everything worked. I added the cpp file and moved the function code over to that and now i get this error when compiling. the header…
CalvinWylie
  • 143
  • 1
  • 1
  • 11
2
votes
1 answer

XAudio2 vs. OpenAL volume

I'm writing a piece of audio wrapper code in C++, to have an abstract API over XAudio2 and OpenAL (and some more later on). Everything works just fine, I have the system up and running, providing almost the same audio. I only seems to have problem…
2
votes
1 answer

Why does XAudio2 play .wav files only when the system is paused?

I've followed the tutorial along Microsoft's website, and created my own SoundEngine and Sound class structure to have the code abstracted away in main, however whenever I make a call such as batmanWav->play(), it will only play the audio if I write…
2
votes
1 answer

XAudio2 Source/Master Voice SetVolume parameters

I'm trying to build a volume slider for my WPF app to apply to the WAV files I'm outputting via XAudio2. I've got it all string together and can play sounds. Great! I just can't make sense of the argument for the SetVolume method. Can anyone…
DougGerard
  • 75
  • 2
  • 8
2
votes
0 answers

Using xaudio2 and a parallel port together

I am using C++ to code a neuroscience experiment in my research lab. We are studying tactile perception, and we use a parallel port to trigger our brain stimulating device. The timing is very important. We recently started using xaudio2 to play very…
LuKo
  • 21
  • 1
2
votes
2 answers

How to play raw pcm audio bytes on UWP apps?

I have a Universal Windows Platform (UWP) app where I want to play audio bytes that I recorded on a old Window phone 8.1 app. The audio is a array of bytes with raw PCM audio (mono, 16 bits, 16kHz). On my old Windows phone 8.1 app I just could use 3…
Toine db
  • 709
  • 7
  • 25
1
2 3
8 9