diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-24 14:39:10 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-24 14:49:13 -0500 |
commit | 1de00ab6bb799db975edf4ebb41b6a27720ee820 (patch) | |
tree | d57825d82c8c8342f3217ea6925b282527065c82 /libs/backends/wavesaudio/wavesapi/akupara/basics.hpp | |
parent | 0a6af1420f61c9ffdb5099c5799f9b477cb2d4d1 (diff) |
new audio engine backend for native CoreAudio audio I/O, and PortMIDI for MIDI.
Code builds, runs and functions. Full code review still pending, and some possibly changes to organization of code within the backend is possible
Diffstat (limited to 'libs/backends/wavesaudio/wavesapi/akupara/basics.hpp')
-rw-r--r-- | libs/backends/wavesaudio/wavesapi/akupara/basics.hpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp b/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp new file mode 100644 index 0000000000..a25e0dd89d --- /dev/null +++ b/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp @@ -0,0 +1,53 @@ +/* + * basics.hpp + * Akupara + * + * Created by Udi on 12/19/06. + * Copyright 2006 __MyCompanyName__. All rights reserved. + * + */ +#if !defined(_AKUPARA_BASICS_HPP__INCLUDED_) +#define _AKUPARA_BASICS_HPP__INCLUDED_ + +#include "WavesPublicAPI/wstdint.h" + +namespace Akupara +{ + // The ultimate nothingness + // This is useful for writing constructors that nullify their object, and for testing nullness + struct null_type + { + null_type() {} + null_type(const null_type *) {} // this allows 0 to be implicitly converted to null_type + }; + inline null_type null() { return null_type(); } + + + // This is a byte, guaranteed to be unsigned regardless of your compiler's char signedness + typedef uint8_t byte_type; + + + // derive from this if your class needs to be noncopyable + class noncopyable_type + { + private: + noncopyable_type(const noncopyable_type &); + noncopyable_type &operator=(const noncopyable_type &); + public: + noncopyable_type() {} + }; + + +} // namespace Akupara + + +#if defined(__GNUC__) +#define AKUPARA_EXPECT_FALSE(x) __builtin_expect(x,false) +#define AKUPARA_EXPECT_TRUE(x) __builtin_expect(x,true ) +#else +#define AKUPARA_EXPECT_FALSE(x) x +#define AKUPARA_EXPECT_TRUE(x) x +#endif // __GNUC__ + + +#endif // _AKUPARA_BASICS_HPP__INCLUDED_ |