Csound Csound-dev Csound-tekno Search About

[Csnd] iOS: a fix for audio coming out speakers when headphones are plugged in

Date2013-02-10 20:38
FromSteven Yi
Subject[Csnd] iOS: a fix for audio coming out speakers when headphones are plugged in
Hi All,

A bug was reported to me that in iOS, if the headphones were plugged
in, audio would still initially start coming from the speaker.  I
found some code to fix up the situation.  When csound goes to run, it
now checks if headphones are in; if so, use that.  If headphones are
not in, then override the audio route to speaker.

I tested this on an iPad and this has fixed the issue with audio going
out the right place when headphones are in or not at start.  I can not
check in regards to ensuring the receiver is bypassed always, but the
code should work (someone with an iPhone is supposed to be testing and
getting back to me by tomorrow).  Assuming all is well, I will push
out a release tomorrow for iOS that has this fix, a new example
showing rendering to disk, and a fix for CachedButton.  (If you want
to look at the headphone/speaker change between now and the release,
it's available here:

https://sourceforge.net/p/csound/csound5-git/ci/7f65a6f1430f30021dc19a0cbfb22f082ea4bc80/tree/iOS/Csound%20iOS%20Examples/csound-iOS/classes/CsoundObj.m)

Thanks!
steven

Date2013-02-10 23:16
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] iOS: a fix for audio coming out speakers when headphones
Steven,

Thanks for all the great work on CsoundForIOS.

Wonderful new features. Can't wait for the next release.  what I am also hoping is that you might consider adding something that.... once you render to disk... will allow the user to "play the file" that they have rendered.

i was hoping that my boulanger labs team would add this prior to the next release, but they have been working like crazy on the new csSpectral and Csound Touch - both coming soon.

We do plan contribute some of our tricks to the next SDK and manual.

Dr. B.

On Sun, Feb 10, 2013 at 3:38 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi All,

A bug was reported to me that in iOS, if the headphones were plugged
in, audio would still initially start coming from the speaker.  I
found some code to fix up the situation.  When csound goes to run, it
now checks if headphones are in; if so, use that.  If headphones are
not in, then override the audio route to speaker.

I tested this on an iPad and this has fixed the issue with audio going
out the right place when headphones are in or not at start.  I can not
check in regards to ensuring the receiver is bypassed always, but the
code should work (someone with an iPhone is supposed to be testing and
getting back to me by tomorrow).  Assuming all is well, I will push
out a release tomorrow for iOS that has this fix, a new example
showing rendering to disk, and a fix for CachedButton.  (If you want
to look at the headphone/speaker change between now and the release,
it's available here:

https://sourceforge.net/p/csound/csound5-git/ci/7f65a6f1430f30021dc19a0cbfb22f082ea4bc80/tree/iOS/Csound%20iOS%20Examples/csound-iOS/classes/CsoundObj.m)

Thanks!
steven


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-02-11 10:49
FromSteven Yi
SubjectRe: [Csnd] iOS: a fix for audio coming out speakers when headphones
Hi Dr. B,

I agree that'd be nice to have. Unfortunately I have little time this
week to look at this; perhaps someone on the list here could spend a
little time to updated the TrappedGenerator example and could
contribute their change.

Thanks!
steven


On Sun, Feb 10, 2013 at 11:16 PM, Dr. Richard Boulanger
 wrote:
> Steven,
>
> Thanks for all the great work on CsoundForIOS.
>
> Wonderful new features. Can't wait for the next release.  what I am also
> hoping is that you might consider adding something that.... once you render
> to disk... will allow the user to "play the file" that they have rendered.
>
> i was hoping that my boulanger labs team would add this prior to the next
> release, but they have been working like crazy on the new csSpectral and
> Csound Touch - both coming soon.
>
> We do plan contribute some of our tricks to the next SDK and manual.
>
> Dr. B.
>
> On Sun, Feb 10, 2013 at 3:38 PM, Steven Yi  wrote:
>>
>> Hi All,
>>
>> A bug was reported to me that in iOS, if the headphones were plugged
>> in, audio would still initially start coming from the speaker.  I
>> found some code to fix up the situation.  When csound goes to run, it
>> now checks if headphones are in; if so, use that.  If headphones are
>> not in, then override the audio route to speaker.
>>
>> I tested this on an iPad and this has fixed the issue with audio going
>> out the right place when headphones are in or not at start.  I can not
>> check in regards to ensuring the receiver is bypassed always, but the
>> code should work (someone with an iPhone is supposed to be testing and
>> getting back to me by tomorrow).  Assuming all is well, I will push
>> out a release tomorrow for iOS that has this fix, a new example
>> showing rendering to disk, and a fix for CachedButton.  (If you want
>> to look at the headphone/speaker change between now and the release,
>> it's available here:
>>
>>
>> https://sourceforge.net/p/csound/csound5-git/ci/7f65a6f1430f30021dc19a0cbfb22f082ea4bc80/tree/iOS/Csound%20iOS%20Examples/csound-iOS/classes/CsoundObj.m)
>>
>> Thanks!
>> steven
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>