xaudio2

XAudio2 - Play generated sine, when changing frequency clicking sound

三世轮回 提交于 2021-02-08 04:57:28
问题 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 static short[] BufferSamples = new short[44100 * 1 * 2]; private SourceVoice sourceVoice; private AudioBuffer buffer; private int Tfreq; public MatchTinn() { InitializeComponent(); Loaded += MatchTinn_Loaded; TFreq = 5000; } private void MatchTinn

Windows phone 8 xaudio2 wav file issue

我是研究僧i 提交于 2020-01-05 10:08:33
问题 I want play a wav file with XAudio2, I have searched on the internet and have some example projects like this: C# XAudio2 Sound Playback for Windows Phone or this: Play wav example but all those playing special wav files, if I replace my wav (converted to MS ADPCM, mono) then CreateSourceVoice return HRESULT 0x88960001. So what are specials of those wav files? or any other methods to play Wav file with xaudio2 (I'm working on windows phone 8) 回答1: According to this article, the XAudio2 only

AudioGraph throws XAUDIO2_E_INVALID_CALL on second frame input node

久未见 提交于 2019-12-25 16:56:50
问题 I'm attempting to use the AudioGraph API of UWP to reproduce a mix of synthesised speech and short notification sounds ("earcons"). UWP has a speech synthesis API which gives me a stream containing a WAV file, but I don't want to make too many assumptions about the parameters (bit rate, sample depth, etc.) so the idea is to have an AudioSubmixNode and add AudioFrameInputNode s whenever there's some speech to reproduce. There's some complexity around queueing up separate utterances so that

Generate tone, or sound, in Windows Phone 8.1 app

爷,独闯天下 提交于 2019-12-25 04:18:06
问题 I am attempting to generate a tone, for a set frequency and duration, on Windows Phone 8.1. Following up on the topic presented here: Playing a sound from a generated buffer in a Windows 8 app, here's my attempted solution for Windows Phone 8.1, running in a simulator in Visual Studio 2015, in VB.NET attempting to implement SharpDX.XAudio2. No sound comes out, but I think it's right. Any ideas? ' Initialization phase, keep this buffer during the life of your application ' Allocate 10s at 44

Building with XAudio2 on Windows 7

 ̄綄美尐妖づ 提交于 2019-12-23 12:08:55
问题 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 SDK: #include <%DXSDK_DIR%Include\xaudio2.h> Result: fatal error C1083: Cannot open include file: '%DXSDK_DIR%Include\xaudio2.h': No such file or directory Oh well. I was pretty sure VC++ didn't expand environment variables like that anyway. So I

Playing sinus through XAudio2

痴心易碎 提交于 2019-12-23 09:32:15
问题 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 is bad. This, for example, is a 3KHz sine curve, captured with Audacity. I have condensed the audio player to the bare basics, but the audio quality is still bad. Is this a bug in XAudio2, SlimDX, or my code, or is this simply an artifact that

How can I play multiple sounds at the same time using SharpDX in WinRT?

吃可爱长大的小学妹 提交于 2019-12-19 10:57:07
问题 I am trying to make a musical instrument type of application. The problem I am having is that a new sound will only play if the old one is finished. I would like to be able to play them simultaneously. This is how my code looks like: First, the MyWave class which simply holds an audio buffer and some other info: class MyWave { public AudioBuffer Buffer { get; set; } public uint[] DecodedPacketsInfo { get; set; } public WaveFormat WaveFormat { get; set; } } In the SoundPlayer class: private

Displaying a video in DirectX

别等时光非礼了梦想. 提交于 2019-12-07 04:16:51
问题 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 differ from the videos (eg by adding letter boxes), although ideally Id like the ability to embed the video into a 3D scene. I could of course work out a way to load each frame into a texture, discarding/reusing the textures once rendered, and

Displaying a video in DirectX

梦想与她 提交于 2019-12-05 09:49:12
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 differ from the videos (eg by adding letter boxes), although ideally Id like the ability to embed the video into a 3D scene. I could of course work out a way to load each frame into a texture, discarding/reusing the textures once rendered, and playing the audio separately through XAudio2, however as well as writing a loader for at least one format,

Windows Phone xaudio2

不羁的心 提交于 2019-12-01 12:19:53
Hej I am using a library for playing audio in Windows Phone found here. Which works fine. I am then trying to add a new .wav file to this system. And I get a memory error. Searching around on the internet gives me that I have to encode the audio using AdpcmEncode command-line tool. However using this tool cannot convert my .wav files. Can anyone help here, regarding encoding to get the audio working? Furthermore just for my information how big can my audio files be? I think I read some place 20 mb, but unsure. Encoding is a bitch. Even with me having the tool and .wav files I did not succeed