Skip to content

Conversation

@marcobarilari
Copy link
Collaborator

@marcobarilari marcobarilari commented May 16, 2020

Just added a couple of line that checks if an audio device was opened and therefore needs to be close. Have you had in mind something like this in #7 ?

@marcobarilari marcobarilari requested a review from Remi-Gau May 16, 2020 17:30
@marcobarilari marcobarilari added the enhancement New feature or request label May 16, 2020
@marcobarilari marcobarilari linked an issue May 16, 2020 that may be closed by this pull request
1 task
Copy link
Contributor

@Remi-Gau Remi-Gau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect.

@Remi-Gau Remi-Gau merged commit adadfd4 into cpp-lln-lab:master May 17, 2020
@marcobarilari marcobarilari deleted the marco-dev_close-audioport branch May 17, 2020 08:01

% Close Psychportaudio if open
if PsychPortAudio('GetOpenDeviceCount') ~= 0
PsychPortAudio('Close');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I might have merged too quickly.

Do you think that the if is necessary?

Can we just not do a psychportaudio(close)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should work anyway. I used that because biased by macs behavior where if you close things that were not opened it crashes badly, e.g. using sca or close all at the beginning of a ptb experiment. But I could be wrong in the case of psychportaudio.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK let's keep it that way then. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve usecase related to any kind of audio experiment

2 participants