On Sat, Sep 27, 2014 at 6:11 AM, Joël Krähemann <weedli...@gmail.com> wrote:
> Am I correct assuming 1 sample of stereo frames will be written 44100
> times by a rate of 44100 Hz audio sampled data?
Yes. Just to be 100% clear, a "sample" is a *single* point of data.

In a mono situation: a "frame" refers to the single sample for that channel.
In stereo: a "frame" refers to 2 samples, one for *each* channel.

So the difference between a frame and a sample is that a sample is
literally a single data point, while a frame is a single "data point"
for each channel.

> Whereby one sample contains 2 frames.
See above :)

> CHANNELS = 2
> buffer_size_per_second = CHANNELS * 44100 * sizeof(signed short);
Yep. The link below is useful for double checking, and for quick disk
space calculations:
http://www.sounddevices.com/calculator/

I've written a tutorial on using SndFile to write to disk: perhaps a
useful resource to check / play with:
https://github.com/harryhaaren/openAudioProgrammingTutorials/blob/master/writingSoundfileToDisk/writingSoundfileToDisk.cpp

HTH, -Harry

-- 

www.openavproductions.com
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Reply via email to