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

Thread: Default constructor for AudioConnection?

  1. #1
    Senior Member
    Join Date
    Jun 2013
    Posts
    514

    Default constructor for AudioConnection?

    In teensyduino 1.57, we can connect and disconnect AudioConnections, so is there any reason why we can't have a default constructor for AudioConnection and make connections in the setup method or elsewhere?

    Code:
    AudioConnection::AudioConnection() {
    	next_dest = AudioStream::unused;
    	AudioStream::unused = this;
    
    	isConnected = false;
    }
    I assume this will work fine. Still waiting for an audioboard, so my ability to test is pretty limited.

  2. #2
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    618
    Quote Originally Posted by yeahtuna View Post
    In teensyduino 1.57, we can connect and disconnect AudioConnections, so is there any reason why we can't have a default constructor for AudioConnection and make connections in the setup method or elsewhere?

    Code:
    AudioConnection::AudioConnection() {
    	next_dest = AudioStream::unused;
    	AudioStream::unused = this;
    
    	isConnected = false;
    }
    I assume this will work fine. Still waiting for an audioboard, so my ability to test is pretty limited.
    Yes, that works fine.

    You can test without an audio adaptor, though the objects available depend on your Teensy - the Info pane to the right of the design tool is your friend here.

  3. #3
    Senior Member
    Join Date
    Jun 2013
    Posts
    514
    Yes, I have seen that tool. I'm interested in testing the limits of audio library with an SSD connected to a USB host port on Teensy 4.1. I need to figure out how to optimize things to get the maximum number of voices, with the least amount of latency. Lots of work to be done. It seem that none of the audio file streaming classes are optimized for low latency operations.

Posting Permissions

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