I'm having a problem getting sound output when I have a small buffer size (1920 frames). If I sample at `48kHz` and make the buffer size `480000` the sine wave plays correctly for 1 second. What I want to do it only play the sine wave for `40ms`. 

I've calculate that to be `48000 samples/sec * 1sec/1000ms * 40ms = 1920 frames`. However, when I try to call `snd_pcm_writei` with only 1920 frames nothing comes out!

Here's the code in question:

```
void PCM::playSound(float freqHz, uint16_t durationMs)
{ 
    int FRAMES_LEN=48000;

    //Send the sine_buffer to sound card, with correct buffer length
    snd_pcm_sframes_t frames = snd_pcm_writei(handle, sine_buffer, FRAMES_LEN);

    if (frames < 0){
        HW_INFO() << "PCM::playSound-- snd_pcm_writei failed,trying to recover:" 
                  << snd_strerror(frames);
        frames = snd_pcm_recover(handle, frames, 0);
    }
    if (frames < 0) {
        HW_INFO() << "PCM::playSound-- snd_pcm_writei recovery failed: " 
                  << snd_strerror(frames);
    }
    HW_INFO() << "Wrote " << frames << " frames";

    return;
}

```

If `FRAMES_LEN` is `48000`, this code works fine and produces a sine wave that last 1 second.

If `FRAMES_LEN` is `1920`, I cannot hear a sine wave at all, but the log states that `Wrote 1920 frames`.

What is happening?