Explorar el Código

Update AudioStream.cpp

teensy4-core
Pete hace 6 años
padre
commit
7a309dfb89
Ninguna cuenta vinculada a la dirección de correo electrónico del committer
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. +9
    -1
      teensy3/AudioStream.cpp

+ 9
- 1
teensy3/AudioStream.cpp Ver fichero

@@ -243,6 +243,8 @@ void AudioConnection::disconnect(void)
// Remove destination from source list
p = src.destination_list;
if (p == NULL) {
//>>> PAH re-enable the IRQ
__enable_irq();
return;
} else if (p == this) {
if (p->next_dest) {
@@ -264,8 +266,14 @@ void AudioConnection::disconnect(void)
p = p->next_dest;
}
}
//>>> PAH release the audio buffer properly
//Remove possible pending src block from destination
dst.inputQueue[dest_index] = NULL;
if(dst.inputQueue[dest_index] != NULL) {
AudioStream::release(dst.inputQueue[dest_index]);
// release() re-enables the IRQ. Need it to be disabled a little longer
__disable_irq();
dst.inputQueue[dest_index] = NULL;
}

//Check if the disconnected AudioStream objects should still be active
src.numConnections--;

Cargando…
Cancelar
Guardar