Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Remove or overwrite an AudioConnection during runtime (using Teensy AudioShield)

  1. #1
    Junior Member
    Join Date
    Feb 2021
    Posts
    3

    Remove or overwrite an AudioConnection during runtime (using Teensy AudioShield)

    Hi,

    Once the AudioConnection has been set, is there a way to remove it or overwrite it by plugging something else in its socket ?
    Lets say I declared this Audio connection :
    Code:
    AudioConnection          patchCord68(LineInPreAmpL, 0, DelayBusL, 1);
    How can I remove patchCord68 during runtime and plug something else in (DelayBusL, 1) ?

    (I bet this has been answered sowehere else already but I haven't found it yet).

    Cheers !

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    897
    AudioConnection has these public methods that deal with attaching and detaching from the signal graph:
    Code:
    	void disconnect(void);
    	void connect(void);
    The constructor calls connect(), the destructor calls disconnect().

  3. #3
    Junior Member
    Join Date
    Feb 2021
    Posts
    3
    Dang... Thanks a lot, that's embarrassing.
    Best Forum ever, MarkT you rock !

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    897
    Not sure they are documented, I read the audio lib source in depth a while back. There may be some
    issues if you randomly play with connections, I recall somewhere there's a thread or two about this.
    I think it would be a wise precaution to only call the connect and disconnect methods within
    an AudioNoInterrupts()/AudioInterrupts() critical section, although they appear to have their
    own low level critical section built-in.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •