Re: [LAD] mixing while using libao and libsndfile

2016-05-17 Thread Andrea Del Signore
On Tue, 17 May 2016 08:26:17 +, David Griffith wrote: > On Tue, 17 May 2016, Andrea Del Signore wrote: > >> On Tue, May 17, 2016 at 12:25 AM, David Griffith >> wrote: >> On Mon, 16 May 2016, Andrea Del Signore wrote: >> >> > I'm not simply trying to mix two files.  My main

Re: [LAD] mixing while using libao and libsndfile

2016-05-17 Thread Paul Davis
Your design is way too simple and fundamentally wrong. If you want low latency you need to use a pull model (aka callback model) for audio i/o to the device. Let the device tell you when it wants audio data, and deliver it,on time, without blocking (which means no on-demand file i/o in the same

Re: [LAD] mixing while using libao and libsndfile

2016-05-17 Thread Andrea Del Signore
On Tue, May 17, 2016 at 10:26 AM, David Griffith wrote: > On Tue, 17 May 2016, Andrea Del Signore wrote: > > On Tue, May 17, 2016 at 12:25 AM, David Griffith wrote: >> On Mon, 16 May 2016, Andrea Del Signore wrote: >> >> > I'm not simply trying to mix two files. My

Re: [LAD] mixing while using libao and libsndfile

2016-05-17 Thread David Griffith
On Tue, 17 May 2016, Andrea Del Signore wrote: On Tue, May 17, 2016 at 12:25 AM, David Griffith wrote: On Mon, 16 May 2016, Andrea Del Signore wrote: > I'm not simply trying to mix two files.  My main project is a > game engine in which two sounds are allowed at any one time.  >

Re: [LAD] mixing while using libao and libsndfile

2016-05-16 Thread Andrea Del Signore
On Mon, 16 May 2016 17:50:24 -0700, David Griffith wrote: > On May 16, 2016 3:25:48 PM PDT, David Griffith > wrote: > >> Earlier you set up filebuffer like this: >> >>buflen = BUFFSIZE * sf_info[0].channels; >>filebuffer = malloc(buflen * sizeof(float)); >> >>The size of

Re: [LAD] mixing while using libao and libsndfile

2016-05-16 Thread Andrea Del Signore
On Tue, May 17, 2016 at 12:25 AM, David Griffith wrote: > On Mon, 16 May 2016, Andrea Del Signore wrote: > > > I've been knocking my head against a wall for more than a year trying to >> > figure out how to correctly mix two streams of audio while using >> > libsndfile for input

Re: [LAD] mixing while using libao and libsndfile

2016-05-16 Thread David Griffith
On May 16, 2016 3:25:48 PM PDT, David Griffith wrote: > Earlier you set up filebuffer like this: > >buflen = BUFFSIZE * sf_info[0].channels; >filebuffer = malloc(buflen * sizeof(float)); > >The size of filebuffer is BUFFSIZE float-sized frames. Therefore when >you >specify

Re: [LAD] mixing while using libao and libsndfile

2016-05-16 Thread David Griffith
On Mon, 16 May 2016, Andrea Del Signore wrote: > I've been knocking my head against a wall for more than a year trying to > figure out how to correctly mix two streams of audio while using > libsndfile for input and libao for output.  My main requirement is that > I cannot assume anything about

Re: [LAD] mixing while using libao and libsndfile

2016-05-16 Thread Andrea Del Signore
> To: linux-audio-dev@lists.linuxaudio.org > Cc: > Date: Mon, 16 May 2016 21:26:40 + (UTC) > Subject: Re: [LAD] mixing while using libao and libsndfile > On Sun, 15 May 2016 16:34:34 +, David Griffith wrote: > > > I've been knocking my head against a wall for mo

[LAD] mixing while using libao and libsndfile

2016-05-15 Thread David Griffith
I've been knocking my head against a wall for more than a year trying to figure out how to correctly mix two streams of audio while using libsndfile for input and libao for output. My main requirement is that I cannot assume anything about the output drivers -- that is, I cannot depend on