# WASAPI sample rate issues

**URL:** <https://forum.juce.com/t/wasapi-sample-rate-issues/6421>\
**Category:** Windows\
**Created:** [February 14, 2011, 11:47pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421 "2011-02-14T23:47:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MusicMan3001](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@MusicMan3001](https://forum.juce.com/u/MusicMan3001)\
**Post date:** [February 14, 2011, 11:47pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/1 "2011-02-14T23:47:06Z")

</div>

Hey everyone.

I’m working on an interactive audio app and I’m trying to use the WASAPI drivers (as opposed to DirectSound) to get good performance.  
One problem I’ve noticed, though, is that you can’t open a full-duplex WASAPI audio device in Juce unless the input and output sample rates match in the Control Panel.  
My app is targeting users who probably won’t know how to access those settings, so I’m trying to make it work even if the sample rates are different.  
Anyone dealt with this issue before? Jules, any plans to handle this case?

Here are some strategies I thought of:

- Change the WASAPIAudioIODevice classes (inside JUCE) so that one AudioIODevice can have different sample rates for input and output, and one is resampled to match the other somehow. The buffering would be tricky.
- Have two different AudioDeviceManagers in my app, each of which handles only input or output, and try my best to synchronize them somehow with my app code.

Any thoughts, suggestions, ideas appreciated.

---

<div class="post-metadata">

**Author:** ![OBO](https://avatars.discourse-cdn.com/v4/letter/o/ba8739/32.png) [@OBO](https://forum.juce.com/u/OBO)\
**Post date:** [February 15, 2011, 8:38am UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/2 "2011-02-15T08:38:17Z")

</div>

+1, i’m in same boat

---

<div class="post-metadata">

**Author:** ![dinaiz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dinaiz/32/182_2.png) [@dinaiz](https://forum.juce.com/u/dinaiz)\
**Post date:** [February 15, 2011, 3:00pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/3 "2011-02-15T15:00:56Z")

</div>

Why WASAPI ? It’s only available in Vista and 7 (not XP) and it’s seems to be not as good as ASIO …

---

<div class="post-metadata">

**Author:** ![TheVinn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thevinn/32/806_2.png) [@TheVinn](https://forum.juce.com/u/TheVinn)\
**Post date:** [February 15, 2011, 3:57pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/4 "2011-02-15T15:57:43Z")

</div>

Typically consumer audio devices, like the built in audio on laptops or desktop motherboards, ship with WASAPI drivers but not ASIO.

---

<div class="post-metadata">

**Author:** ![dinaiz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dinaiz/32/182_2.png) [@dinaiz](https://forum.juce.com/u/dinaiz)\
**Post date:** [February 15, 2011, 4:06pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/5 "2011-02-15T16:06:30Z")

</div>

True, but installing asio4all isn’t too chalenging, even for the end user, is it ? 🙂

---

<div class="post-metadata">

**Author:** ![TheVinn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thevinn/32/806_2.png) [@TheVinn](https://forum.juce.com/u/TheVinn)\
**Post date:** [February 15, 2011, 5:55pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/6 "2011-02-15T17:55:28Z")

</div>

> [@dinaiz](#):
>
> True, but installing asio4all isn’t too chalenging, even for the end user, is it ? 🙂

Never overestimate the end user!

---

<div class="post-metadata">

**Author:** ![MusicMan3001](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@MusicMan3001](https://forum.juce.com/u/MusicMan3001)\
**Post date:** [February 15, 2011, 5:56pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/7 "2011-02-15T17:56:06Z")

</div>

I’ve used Asio4All myself, and I love it. But unfortunately, our app is targeting novice-level users, and we can’t expect that all of them will know how (or want) to install Asio4All.  
Thanks.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [February 15, 2011, 9:00pm UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/8 "2011-02-15T21:00:08Z")

</div>

It’d be a bit of a nightmare to implement a driver that can sync two separately-running devices with different sample rates, though it’s something I’ve thought about.

---

<div class="post-metadata">

**Author:** ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)\
**Post date:** [September 1, 2020, 7:04am UTC](https://forum.juce.com/t/wasapi-sample-rate-issues/6421/9 "2020-09-01T07:04:56Z")

</div>

Since Windows 8, WASAPI will do SRC for you, enabling using input and output devices with mismatching native rates. Here’s a patch to enable it:

> [@Enabling Windows Audio's SRC](https://forum.juce.com/t/enabling-windows-audios-src/41509):
>
> Some audio devices, like Microsoft’s LifeChat LX-3000 USB handset, have different input and output sample rates (41.1k & 48k Hz in its case), and JUCE with Windows Audio (WASAPI) doesn’t support that. But, since Windows 8 it seems that Windows Audio supports SRC, if you ask it to. So I made a [commit](https://github.com/soundradix/JUCE/commit/1162b8d1ec2542ced126f1d00a7e4ea075615395) to enable it. Seems to work slight_smile Many thanks to [PortAudio](http://www.portaudio.com/) whose source I looked at to discover the right Win API chants for this. Feel free to use it (note that our master branch is JUCE …
