wasapi

WASAPI: Choosing a wave format for exclusive output

て烟熏妆下的殇ゞ 提交于 2019-12-06 07:30:52
问题 I'm trying to open an exclusive stream with an output device using WASAPI. I'm having trouble choosing an acceptable format, since there appear to be no hints as to what formats are accepted by a given device. In my case, IAudioClient::GetMixFormat() , which would otherwise return a sort of default format for the device, returns a format that can't be used in exclusive mode ( IAudioClient::IsFormatSupported() returns AUDCLNT_E_UNSUPPORTED_FORMAT ). I don't know where to go from there. There's

WASAPI Resampling / Windows Media Foundation

我与影子孤独终老i 提交于 2019-12-06 02:30:53
I'm writing a Pro Audio application using WASAPI. This application runs a stream in exclusive mode, and resamples the audio data to and from a constant format in both directions (one resample between the capture device and the app, and another between the app and the output device). There's a page on MSDN about an Audio Resampler DSP here , but I'm not sure if this is the API I want to use. The reason I'm not sure about it is the way the API is designed. Using IMFTransform, I need a bunch of extra buffers that really only complicate the process, and the object is designed almost like a

audio capture in metro apps

坚强是说给别人听的谎言 提交于 2019-12-05 18:19:59
I need to perform low-level audio capture in my Windows 8 Metro-style app. I guess I need to use the IAudioClient interface, but how to get that interface? Microsoft says "A client obtains a reference to an IAudioClient interface for an audio endpoint device by using one of the techniques described in IMMDevice Interface.." http://msdn.microsoft.com/en-us/library/windows/desktop/dd370865(v=vs.85).aspx but IMMDevice interface is not supported for Metro-style apps. How does one get an IAudioClient interface ? I got an answer from the MSDN forums: Platform::String^ id = Windows::Media::Devices:

How to get Audio Formats supported by physical device (WinAPI, Windows)

社会主义新天地 提交于 2019-12-04 15:29:10
I have an audio device (a USB microphone) and I want to find out what audio formats it supports natively (bit depth & sample rate), on OS X there is a nice kAudioStreamPropertyAvailablePhysicalFormats Core Audio property, but I fail to find something similar on Windows. I know there is this question Windows Core Audio Api get all supported formats on capture device but The answer is bad... and I'm not limited with windows Core Audio APIs, I need any way. Windows itself somehow knows it, so most likely there should be a way, via IOCTL for example, DirectShow or WMI or something else. Probably

WASAPI: Choosing a wave format for exclusive output

心不动则不痛 提交于 2019-12-04 14:54:21
I'm trying to open an exclusive stream with an output device using WASAPI. I'm having trouble choosing an acceptable format, since there appear to be no hints as to what formats are accepted by a given device. In my case, IAudioClient::GetMixFormat() , which would otherwise return a sort of default format for the device, returns a format that can't be used in exclusive mode ( IAudioClient::IsFormatSupported() returns AUDCLNT_E_UNSUPPORTED_FORMAT ). I don't know where to go from there. There's a ridiculous number of combinations of wave format parameters - do I literally have to iterate through

Peak meters for individual programs on Windows 7

邮差的信 提交于 2019-11-29 01:31:45
问题 Is it possible to obtain the peak meter readings for individual programs on Windows 7, and if so, how? With WASAPI one can capture the entire system audio through a loopback device, but this does not differentiate between outputs from different programs. This question regards capturing audio for a single specified application, but the answers seem prohibitive when dealing with capturing all programs that are playing audio individually. This must be possible because SndVol can do it, as shown

Is it possible to capture the rendering audio session from another process?

北城以北 提交于 2019-11-28 01:42:00
I am taking my first dives in to the WASAPI system of windows and I do not know if what I want is even possible with the windows API. I am attempting to write program that will record the sound from various programs and break each in to a separate recorded track/audio file. From the reseacrch I have done I know the unit I need to record is the various audio sessions being rendered to a endpoint, and the normal way of recording is by taking the render endpoint and performing a loopback. However from what I have read so far in the MSDN the only interaction with sessions I can do is through

Capture audio of a single application on Windows 7

我的梦境 提交于 2019-11-27 23:12:45
Is there a way to capture the audio outputted by only a single application, and not the system as a whole? With WASAPI I can capture the entire system audio , but I wish to only capture the audio from one application (there will be many applications, all playing audio at once.) Detours is used for hooking. Using the lib to hook IAudioRenderClient interface, including GetBuffer and ReleaseBuffer , and read data from the buffer. Depending on the APIs used by the application to play the audio, you could write an AppInit DLL that will wrap the built-in waveIn\waveOut functions and would pass along

Windows Vista/7: How to sample output audio mix?

断了今生、忘了曾经 提交于 2019-11-27 21:42:42
How can i gain access to the current wave output sample stream? In a December 2006 question on social.microsoft.com ( How to record from 'Wave' or 'Stereo Mix' in Vista? ) yjslash asked: On Windows XP or earlier, I could capture the audio stream to the speaker. In other words, DirectSoundCapture was able to capture from the selected source line. And if "Wave Out Mix" or "Stereo Mix" or something similar was selected as recording source line, DirectSoundCapture was able to record the audio stream to the speaker. To which Larry Osterman (MSFT) (audio team dev and StackOverflow user ) responded:

Getting individual windows application current volume output level as visualized in audio Mixer

元气小坏坏 提交于 2019-11-26 22:30:59
I am trying to write a C# code that outputs the current audio output level from each of the windows application accessing the sound output (as shown with constantly changing green bars of the Volume mixer). The program will check every 10 ms, and outputs sth like this: Windows Media Player: 30, Mozilla Firefox: 0, Adobe Flash Player: 35 (as per the figure) I am using Windows 7, and trying it in C# (as Java cannot achieve this). I have found ways to get and set the Master Volume (the handle bar which shows 65% for Windows Media Player) for a running application, is there a way to get the green