-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Fix some tests and refactor files
- Loading branch information
Showing
20 changed files
with
546 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include <ossia/detail/config.hpp> | ||
|
||
#include <ossia/detail/audio_spin_mutex.hpp> | ||
#include <ossia/detail/mutex.hpp> | ||
|
||
#include <mutex> | ||
|
||
#if defined(OSSIA_PARALLEL) | ||
using ossia_audio_lock_t = std::unique_lock<ossia::audio_spin_mutex>; | ||
#define OSSIA_EXEC_STATE_LOCK_READ(state) \ | ||
ossia_audio_lock_t ossia_read_lock \ | ||
{ \ | ||
(state).mutex \ | ||
} | ||
#define OSSIA_EXEC_STATE_LOCK_WRITE(state) \ | ||
ossia_audio_lock_t ossia_write_lock \ | ||
{ \ | ||
(state).mutex \ | ||
} | ||
#else | ||
struct ossia_audio_lock_t | ||
{ | ||
void lock() { } | ||
void unlock() { } | ||
}; | ||
#define OSSIA_EXEC_STATE_LOCK_READ(state) \ | ||
ossia_audio_lock_t ossia_read_lock; \ | ||
(void)ossia_read_lock; | ||
#define OSSIA_EXEC_STATE_LOCK_WRITE(state) \ | ||
ossia_audio_lock_t ossia_write_lock; \ | ||
(void)ossia_write_lock; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.