mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-17 08:56:45 -05:00
Added SND_RAWMIDI_SYNC flag.
This commit is contained in:
parent
1498d2ea66
commit
7025482a40
2 changed files with 6 additions and 0 deletions
|
|
@ -31,6 +31,8 @@ typedef enum _snd_rawmidi_stream {
|
||||||
#define SND_RAWMIDI_APPEND 1
|
#define SND_RAWMIDI_APPEND 1
|
||||||
/** Non blocking mode \hideinitializer */
|
/** Non blocking mode \hideinitializer */
|
||||||
#define SND_RAWMIDI_NONBLOCK 2
|
#define SND_RAWMIDI_NONBLOCK 2
|
||||||
|
/** Write sync mode \hideinitializer */
|
||||||
|
#define SND_RAWMIDI_SYNC 4
|
||||||
|
|
||||||
/** RawMidi handle */
|
/** RawMidi handle */
|
||||||
typedef struct _snd_rawmidi snd_rawmidi_t;
|
typedef struct _snd_rawmidi snd_rawmidi_t;
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,10 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
||||||
if (mode & SND_RAWMIDI_NONBLOCK) {
|
if (mode & SND_RAWMIDI_NONBLOCK) {
|
||||||
fmode |= O_NONBLOCK;
|
fmode |= O_NONBLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mode & SND_RAWMIDI_SYNC) {
|
||||||
|
fmode |= O_SYNC;
|
||||||
|
}
|
||||||
|
|
||||||
assert(!(mode & ~(SND_RAWMIDI_APPEND|SND_RAWMIDI_NONBLOCK)));
|
assert(!(mode & ~(SND_RAWMIDI_APPEND|SND_RAWMIDI_NONBLOCK)));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue