To avoid this, open the Sound Card Properties and disable "Allow applications to take exclusive control of this device". If your sound card is in shared mode, all applications should use the same audio format for both playback and recording.
If the audio stream has a different sample rate, it must be resampled to the default format. In general this reduces the sound quality. It would be a good idea to use the same audio format in the recorder settings. Start the audio recorder , open the settings, select the desired audio codec and set the default sample rate. The availability of this tab depends on the sound card manufacturer. There is two settings overlapping here. Microphone settings in the settings app.
And sound settings control panel where you can also set this option for each individual audio device so microphones too. Check the control panel options and set your mic as default too when you are at it.
Run hardware and devices troubleshooter first. Reinstall microphone drivers. Make sure the exclusive control option If you consider your problem solved it would be very good if you marked the answer which helped you so others can find and use this thread. If this didn't solve your problem or you need further assistance please answer in this thread and i would be happy to help.
How satisfied are you with this reply? However, the controls in these interfaces have no effect on exclusive-mode streams. Instead, applications that manage exclusive-mode streams typically use the IAudioEndpointVolume interface in the EndpointVolume API to control the volume levels of those streams. For information about this interface, see Endpoint Volume Controls. For each playback device and capture device in the system, the user can control whether the device can be used in exclusive mode.
If the user disables exclusive-mode use of the device, the device can be used to play or record only shared-mode streams. If the user enables exclusive-mode use of the device, the user can also control whether a request by an application to use the device in exclusive mode will preempt the use of the device by applications that might currently be playing or recording shared-mode streams through the device. If preemption is enabled, a request by an application to take exclusive control of the device succeeds if the device is currently not in use, or if the device is being used in shared mode, but the request fails if another application already has exclusive control of the device.
If preemption is disabled, a request by an application to take exclusive control of the device succeeds if the device is not currently in use, but the request fails if the device is already being used either in shared mode or in exclusive mode.
The following code example shows how to play a low-latency audio stream on an audio-rendering device that is configured for use in exclusive mode:. In the preceding code example, the PlayExclusiveStream function runs in the application thread that services the endpoint buffers while a rendering stream is playing. The function takes a single parameter, pMySource, which is a pointer to an object that belongs to a client-defined class, MyAudioSource.
This class has two member functions, LoadData and SetFormat, that are called in the code example. MyAudioSource is described in Rendering a Stream. The PlayExclusiveStream function calls a helper function, GetStreamFormat, that negotiates with the default rendering device to determine whether the device supports an exclusive-mode stream format that is suitable for use by the application.
The code for the GetStreamFormat function does not appear in the code example; that is because the details of its implementation depend entirely on the requirements of the application. However, the operation of the GetStreamFormat function can be described simply—it calls the IAudioClient::IsFormatSupported method one or more times to determine whether the device supports a suitable format.
The requirements of the application dictate which formats GetStreamFormat presents to the IsFormatSupported method and the order in which it presents them. Next, the function calls the IAudioClient::Initialize method to request a buffer duration equal to the minimum period. If the call succeeds, the Initialize method allocates two endpoint buffers, each of which is equal in duration to the minimum period. Later, when the audio stream begins running, the application and audio hardware will share the two buffers in "ping-pong" fashion—that is, while the application writes to one buffer, the hardware reads from the other buffer.
0コメント