Please check your
private messages regarding an important administrative matter.
Addressing Jonas' concerns, making this real code and using code tags:
(minor changes made for readability)
Hint: Take a look at the debug message I added at line 28 - does that look correct to you?
Note that this matches up neatly with the debug message at line 32 - the expected amount to write + audio format header = output size.
Also - line 23 does not block. By the time you get to line 25 you do not know what state your playableClip is in - has it just started, has it completed, has the end user chosen how large they would like the resultant clip?
For that matter: is there even a need for line 23? I assume that this is where you are going to have your hook to allow the user to choose how much of the input they want to output, but for now it has no value.