ofSoundStream::stop() causes error

Hi,
if I’m trying to stop my soundstream I get an “RtAudioError” error. Can anyone tell me if i am using it the right way?
thanks
This is my code:

void ofApp::setup(){
	stream1.setup(this, 2, 0, 44100, 512, 4);
}

void ofApp::audioOut(float * buffer, int bufferSize, int nChannels)
{
	for (int i = 0; i < bufferSize; i++) {

	}
}

//--------------------------------------------------------------
void ofApp::keyPressed(int key){
	switch (key)
	{
	case 's':
		stream1.start(); 
		break; 
	case 'p':
		stream1.stop(); 
		break;

	default:
		break;
	}
}

in what platform? on windows and linux sometimes the default api doesn’t work right away and you have to select one manually

I’m working on windows

it was not specified. But changing it didnt change anything.
I just tried the default soundBufferExample. In this example I could start and stop the soundstream without causing any errors.
So maybe I’m doing something wrong. But I’m not sure what.

I did some more testing with the code above.

If I press ‘p’ after Startup, the soundstream will stop without error.
From this point i can start it again, pressing ‘s’.
I can repeat this procedure over and over again without errors.
Until I press ‘s’ when the soundstream is already running. Then I get an console output: RtApiWasapi::startStream: The stream is already running.
If I now press ‘p’ again, it will crash.
Can u tell me if this is a bug?
Because i dont think it is supposed behave like this.
Thanks for your help.

yes that sounds like a bug, can you open an issue on github?

thanks!