Using libsox with multiple threads

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using libsox with multiple threads

Tobias Rapp
Hi!

I would like to know the current status for multi-threading support in
libsox 14.4.0. Is it allowed to have one effect chain per thread like in
the attached example (which is a modified version of example0.c which comes
with SoX)?

Regards,
Tobias

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

example0-mt.c (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Using libsox with multiple threads

Doug Cook-2
On Wed, Jan 25, 2012 at 1:22 AM, Tobias Rapp <[hidden email]> wrote:
> Hi!
>
> I would like to know the current status for multi-threading support in
> libsox 14.4.0. Is it allowed to have one effect chain per thread like in
> the attached example (which is a modified version of example0.c which comes
> with SoX)?
>
> Regards,
> Tobias

The current release of SoX is 14.4.2. You might consider upgrading.

What you describe is not explicitly supported or tested, but I think
it will work ok. Status and error messages might be corrupted or
slightly inaccurate in certain cases (you might see a message like
"foo.c: update complete" when it really should say "bar.c: update
complete"). But as long as you don't update any of the global
structures while any effect chain is in progress, you should be ok.

There will be some work on this for the next version of SoX to make
this a fully-supported scenario.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Using libsox with multiple threads

Ulrich Klauer-2
Doug Cook <[hidden email]>:

> The current release of SoX is 14.4.2. You might consider upgrading.

I think you read a 3 for a 4 here. :)

Ulrich

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Using libsox with multiple threads

Tobias Rapp
In reply to this post by Doug Cook-2
Doug Cook wrote:
> What you describe is not explicitly supported or tested, but I think
> it will work ok. Status and error messages might be corrupted or
> slightly inaccurate in certain cases (you might see a message like
> "foo.c: update complete" when it really should say "bar.c: update
> complete"). But as long as you don't update any of the global
> structures while any effect chain is in progress, you should be ok.

Ok, so maybe I just set the global output_message_handler to NULL before
staring the threads to avoid confusion (and output, of course).

> There will be some work on this for the next version of SoX to make
> this a fully-supported scenario.

That sounds great!

Thanks,
Tobias


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users