|
|
|
|
|
|
|
|
// Remove destination from source list |
|
|
// Remove destination from source list |
|
|
p = src.destination_list; |
|
|
p = src.destination_list; |
|
|
if (p == NULL) { |
|
|
if (p == NULL) { |
|
|
|
|
|
//>>> PAH re-enable the IRQ |
|
|
|
|
|
__enable_irq(); |
|
|
return; |
|
|
return; |
|
|
} else if (p == this) { |
|
|
} else if (p == this) { |
|
|
if (p->next_dest) { |
|
|
if (p->next_dest) { |
|
|
|
|
|
|
|
|
p = p->next_dest; |
|
|
p = p->next_dest; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//>>> PAH release the audio buffer properly |
|
|
//Remove possible pending src block from destination |
|
|
//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 |
|
|
//Check if the disconnected AudioStream objects should still be active |
|
|
src.numConnections--; |
|
|
src.numConnections--; |