Browse by Tags

Tagged Content List
  • Blog Post: Poking into the "trusted root certification authorities" certificate stores for the current user and the local machine

    Sometimes, like when trying to install a test driver you just built, it is very important to distinguish between "I trust this code" and "my machine trusts this code." It can be difficult to tell the difference by just double-clicking on a .cat file or using signtool.exe verify - luckily, the Microsoft...
  • Blog Post: Taking audio glitch traces on Windows 10: phone edition

    Related blog post: Taking audio glitch traces on Windows 10: desktop edition Sometimes if audio is glitching we will reach out to people and ask them to take glitch traces so we can look at them and try to figure out what is going on. One of the tools we use to take audio glitch traces on Windows...
  • Blog Post: Taking audio glitch traces on Windows 10: desktop edition

    Related post: Taking audio glitch traces on Windows 10: phone edition Sometimes if audio is glitching we will reach out to people and ask them to take glitch traces so we can look at them and try to figure out what is going on. One of the tools we use to take audio glitch traces on Windows 10 desktop...
  • Blog Post: Playing audio to the earpiece from a Windows Phone 8.1 universal app

    Some time ago I blogged about the Windows Phone AudioRoutingManager API which allows you to put a "Speakerphone" and "Bluetooth" button in your Windows Phone app. A common question that I get now is "I'm trying to play audio to the earpiece from my app, but AudioRoutingManager::SetAudioEndpoint(AudioRoutingEndpoint_Earpiece...
  • Blog Post: Enumerating inactive volume sessions

    In my last blog post on this topic I showed how to get all kinds of information for the active audio sessions, including the Windows 8 Store package identifier for the process (if there was one.) However, I recently had a need to pull information for inactive sessions too - and it needed to run downlevel...
  • Blog Post: Walking the IDeviceTopology tree to see audio driver settings

    I've blogged before about using the IDeviceTopology API to poke around the internal structure exposed by audio drivers . In particular, given an audio endpoint, you can map out all the knobs and widgets of all the signal paths that feed into that endpoint (for playback) or out of it (for recording...
  • Blog Post: Draining the WASAPI capture buffer fully

    About six years ago I wrote a blog post about how to do WASAPI loopback capture . Since then, a few issues have come to light. One big issue is that we're using MMCSS registration directly. Nowadays the much-preferred approach is to use a Media Foundation work queue ; yes, you can use a Media Foundation...
  • Blog Post: More on audio buffer alignment requirements

    I chatted in the past about how audio device alignment requirements impact the buffer size and the WASAPI alignment dance . There are three alignment requirements on audio buffers: The buffer size must be a multiple of WAVEFORMATEX.nBlockAlign. This allows individual audio frames to be copied...
  • Blog Post: Using the Speech API to convert speech to text

    Some time ago I created a "listen.exe" tool which used SAPI's ISpRecoContext to listen to the microphone and dump any recognized text to the console . Today I had to debug an issue with SAPI reading from a .wav file, so I updated it to accept a listen.exe --file foo.wav argument; this consumes the...
  • Blog Post: Troubleshooting default audio device heuristics

    In Windows 7 we published a white paper which shows how Windows chooses which audio device should be the default . This remains true for Windows 8 and Windows 8.1. The six factors that are considered for each device are: Jack detection capability Whether KSJACK_DESCRIPTION2.JackCapabilities...
  • Blog Post: A mental model for the Windows Phone AudioRoutingManager API

    The Windows Phone SDK includes a Windows.Phone.Media.Devices.AudioRoutingManager API which I had occasion to use. The API allows apps that have communication audio streams (e.g., Voice over IP calls) to control whether the audio goes out over the earpiece, over the speakerphone, or over the Bluetooth...
  • Blog Post: Why is 1 Pascal equal to 94 dB Sound Pressure Level? (1 Pa = 94 dB SPL)

    Last time we talked about why a full-scale digital sine wave has a power measurement of -3.01 dB FS (Spoiler: because it's not a square wave.) This time we'll discuss why an atmospheric sound which generates a root-mean-square pressure of 1 Pascal has a power measurement 94 dB SPL. As before, dB...
  • Blog Post: Getting peak meters and volume settings for all apps and audio devices on the system

    A few previous posts have touched on how to get peak meter readings on the device, and per-app Getting the package full name of a Windows Store app, given the process ID More on IAudioSessionControl and IAudioSessionControl2, plus: how to log a GUID Getting audio peak meter values for all...
  • Blog Post: shellproperty.exe - set/read string properties on a file from the command line

    Yesterday Raymond Chen blogged a "Little Program" which could edit audio metadata . As it happens, I have a similar tool I threw together which accepts a property key and a string property value to update a property, or can read a string or string-vector property. Usage: >shellproperty shellproperty...
  • Blog Post: More on IAudioSessionControl and IAudioSessionControl2, plus: how to log a GUID

    A while back I blogged about using IAudioSessionControl and IAudioSessionControl2 to get a list of active sessions, and then using IAudioMeterInformation to see what the amplitude level of the audio being played from each session was . I decided to go back and push this a little further and see what...
  • Blog Post: Buffer size alignment and the audio period

    I got an email from someone today, paraphrased below: Q: When I set the sampling frequency to 48 kHz, and ask Windows what the audio period is, I get exactly 10 milliseconds. When I set it to 44.1 kHz, I get very slightly over 10 milliseconds: 10.1587 milliseconds, to be precise. Why? A: Alignment...
  • Blog Post: Grabbing the output of the Microsoft Speech API text-to-speech engine as audio data

    A while ago I wrote a post on Implementing a "say" command using ISpVoice from the Microsoft Speech API which showed how to use Speech API to do text-to-speech, but was limited to playing the generated audio out of the default audio device. Recently on the Windows Pro Audio forums, user falven asked...
  • Blog Post: How to dump Speech API object properties

    Stamatis Pap asked in a forum thread how to use a Speech API ISpVoice with a non-default audio device . This MSDN article shows how to use SpEnumTokens to list all the currently active audio outputs, but the number and order of audio outputs is subject to change as things come and go, or as the default...
  • Blog Post: Enumerating mixer devices, mixer lines, and mixer controls

    The WinMM multimedia APIs include an API for enumerating and controlling all the paths through the audio device; things like bass boost, treble control, pass-through audio from your CD player to your headphones, etc. This is called the "mixer" API and is the forerunner of the IDeviceTopology API. ...
  • Blog Post: Enumerating MIDI devices

    In addition to audio playback and recording, Windows Multimedia (WinMM) provides a Musical Instrument Digital Interface (MIDI) API . Here's how to make a list of all the MIDI devices on the system, their capabilities, and the hardware device interface associated with each of them. Source and binaries...
  • Blog Post: Implementing a "listen" command using ISpRecoContext from the Microsoft Speech API

    Earlier today I posted a quick "say.exe" sample app which you give text and it speaks the text aloud using the text-to-speech part of the Windows Speech API. It was very straightforward - only 67 lines of C++ code. It took me a little longer to figure out how to do this "listen.exe" sample app; you...
  • Blog Post: Implementing a "say" command using ISpVoice from the Microsoft Speech API

    I've known for a while that Microsoft Windows comes with text-to-speech and speech-to-text APIs, which power the Narrator and Speech Recognition features respectively. This forum post prompted me to mess around with them a little. I came up with this implementation of a say.exe command which takes...
  • Blog Post: Muting all audio outputs with IAudioEndpointVolume

    I have a selfhost tool that I use to mute all audio outputs programmatically. Pseudocode: IMMDeviceEnumerator::EnumAudioEndpoints for each device: IMMDevice::Activate(IAudioEndpointVolume) IAudioEndpointVolume::SetMute(TRUE) Source and binaries attached.
  • Blog Post: Getting audio peak meter values for all active audio sessions

    The Windows Vista volume mixer shows a peak meter for the device. In Windows 7 we added a peak meter for each application. The audio interface for both is IAudioMeterInformation ; I've used this before in my post about the linearity of Windows volume APIs . This post showed how an application can...
  • Blog Post: Sample: how to enumerate waveIn and waveOut devices on your system

    This shows how to call waveInGetNumDevs, waveInGetDevCaps, waveOutGetNumDevs, and waveOutGetDevCaps. // main.cpp #include <windows.h> #include <mmsystem.h> #include <stdio.h> #define LOG(format, ...) wprintf(format L"\n", __VA_ARGS__) int _cdecl wmain() { UINT devs...
Page 1 of 3 (59 items) 123