## AgsOssMidiin

AgsOssMidiin — Input from sequencer

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_OSS_MIDIIN_GET_OBJ_MUTEX()
GQuark | ags_oss_midiin_error_quark ()
gboolean | ags_oss_midiin_test_flags ()
void | ags_oss_midiin_set_flags ()
void | ags_oss_midiin_unset_flags ()
void | ags_oss_midiin_switch_buffer_flag ()
AgsOssMidiin * | ags_oss_midiin_new ()

## Properties

gpointer | attack | Read
double | bpm | Read / Write
gpointer | buffer | Read
double | delay-factor | Read / Write
char * | device | Read / Write

## Types and Values

#define | AGS_OSS_MIDIIN_DEFAULT_OSS_DEVICE
#define | AGS_OSS_MIDIIN_DEFAULT_OSS_MIXER_DEVICE
#define | AGS_OSS_MIDIIN_DEFAULT_APP_BUFFER_SIZE
#define | AGS_OSS_MIDIIN_DEFAULT_BACKEND_BUFFER_SIZE
#define | AGS_OSS_MIDIIN_DEFAULT_BUFFER_SIZE
enum | AgsOssMidiinFlags
enum | AgsOssMidiinAppBufferMode
enum | AgsOssMidiinBackendBufferMode
enum | AgsOssMidiinSyncFlags
#define | AGS_OSS_MIDIIN_ERROR
enum | AgsOssMidiinError

## Object Hierarchy

        GFlags
        ╰── AgsOssMidiinFlags
        GObject
        ╰── AgsOssMidiin

## Includes

    #include <ags/audio/ags_oss_midiin.h>

## Description

AgsOssMidiin represents a sequencer and supports midi input.

## Functions

### AGS_OSS_MIDIIN_GET_OBJ_MUTEX()

    #define AGS_OSS_MIDIIN_GET_OBJ_MUTEX(obj) (&(((AgsOssMidiin *) obj)->obj_mutex))

### ags_oss_midiin_error_quark ()

    GQuark
    ags_oss_midiin_error_quark ();

### ags_oss_midiin_test_flags ()

    gboolean
    ags_oss_midiin_test_flags (AgsOssMidiin *oss_midiin,
                               AgsOssMidiinFlags flags);

Test `flags` to be set on `oss_midiin` .

#### Parameters

oss_midiin | the AgsOssMidiin |
flags | the flags |

#### Returns

`TRUE` if flags are set, else `FALSE`

Since: 3.13.2

### ags_oss_midiin_set_flags ()

    void
    ags_oss_midiin_set_flags (AgsOssMidiin *oss_midiin,
                              AgsOssMidiinFlags flags);

Enable a feature of `oss_midiin` .

#### Parameters

oss_midiin | the AgsOssMidiin |
flags | see AgsOssMidiinFlags |

Since: 3.13.2

### ags_oss_midiin_unset_flags ()

    void
    ags_oss_midiin_unset_flags (AgsOssMidiin *oss_midiin,
                                AgsOssMidiinFlags flags);

Disable a feature of `oss_midiin` .

#### Parameters

oss_midiin | the AgsOssMidiin |
flags | see AgsOssMidiinFlags |

Since: 3.13.2

### ags_oss_midiin_switch_buffer_flag ()

    void
    ags_oss_midiin_switch_buffer_flag (AgsOssMidiin *oss_midiin);

The buffer flag indicates the currently played buffer.

#### Parameters

oss_midiin | the AgsOssMidiin |

Since: 3.13.2

### ags_oss_midiin_new ()

    AgsOssMidiin *
    ags_oss_midiin_new ();

Creates a new instance of AgsOssMidiin.

#### Returns

the new AgsOssMidiin

Since: 3.13.2

## Types and Values

### AGS_OSS_MIDIIN_DEFAULT_OSS_DEVICE

    #define AGS_OSS_MIDIIN_DEFAULT_OSS_DEVICE "/dev/midi00"

### AGS_OSS_MIDIIN_DEFAULT_OSS_MIXER_DEVICE

    #define AGS_OSS_MIDIIN_DEFAULT_OSS_MIXER_DEVICE "/dev/mixer"

### AGS_OSS_MIDIIN_DEFAULT_APP_BUFFER_SIZE

    #define AGS_OSS_MIDIIN_DEFAULT_APP_BUFFER_SIZE (4)

### AGS_OSS_MIDIIN_DEFAULT_BACKEND_BUFFER_SIZE

    #define AGS_OSS_MIDIIN_DEFAULT_BACKEND_BUFFER_SIZE (8)

### AGS_OSS_MIDIIN_DEFAULT_BUFFER_SIZE

    #define AGS_OSS_MIDIIN_DEFAULT_BUFFER_SIZE (4096)

### enum AgsOssMidiinFlags

Enum values to control the behavior or indicate internal state of AgsOssMidiin by enable/disable as flags.

#### Members

AGS_OSS_MIDIIN_INITIALIZED | recording is initialized |
AGS_OSS_MIDIIN_START_RECORD | just started recording |
AGS_OSS_MIDIIN_RECORD | is recording |
AGS_OSS_MIDIIN_SHUTDOWN | stop recording |
AGS_OSS_MIDIIN_NONBLOCKING | do non-blocking calls |
AGS_OSS_MIDIIN_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsOssMidiinAppBufferMode

Enum values to indicate internal state of AgsOssMidiin application buffer by setting mode.

#### Members

AGS_OSS_MIDIIN_APP_BUFFER_0 | ring-buffer 0 |
AGS_OSS_MIDIIN_APP_BUFFER_1 | ring-buffer 1 |
AGS_OSS_MIDIIN_APP_BUFFER_2 | ring-buffer 2 |
AGS_OSS_MIDIIN_APP_BUFFER_3 | ring-buffer 3 |

### enum AgsOssMidiinBackendBufferMode

Enum values to indicate internal state of AgsOssMidiin backend buffer by setting mode.

#### Members

AGS_OSS_MIDIIN_BACKEND_BUFFER_0 | ring-buffer 0 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_1 | ring-buffer 1 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_2 | ring-buffer 2 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_3 | ring-buffer 3 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_4 | ring-buffer 4 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_5 | ring-buffer 5 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_6 | ring-buffer 6 |
AGS_OSS_MIDIIN_BACKEND_BUFFER_7 | ring-buffer 7 |

### enum AgsOssMidiinSyncFlags

Enum values to control the synchronization between sequencer and poll.

#### Members

AGS_OSS_MIDIIN_PASS_THROUGH | do not sync |
AGS_OSS_MIDIIN_INITIAL_POLL | initial poll |
AGS_OSS_MIDIIN_POLL_WAIT | sync wait, sequencer conditional lock |
AGS_OSS_MIDIIN_POLL_DONE | sync done, sequencer conditional lock |
AGS_OSS_MIDIIN_POLL_FINISH_WAIT | sync wait, client conditional lock |
AGS_OSS_MIDIIN_POLL_FINISH_DONE | sync done, client conditional lock |
AGS_OSS_MIDIIN_POLL_SWITCH_BUFFER | switch buffer |

### AGS_OSS_MIDIIN_ERROR

    #define AGS_OSS_MIDIIN_ERROR (ags_oss_midiin_error_quark())

### enum AgsOssMidiinError

#### Members

AGS_OSS_MIDIIN_ERROR_LOCKED_SEQUENCER |  |

## Property Details

### The `“attack”` property

      “attack”                   gpointer

Attack of the buffer

Owner: AgsOssMidiin

Flags: Read

Since: 3.13.2

### The `“bpm”` property

      “bpm”                      double

Beats per minute

Owner: AgsOssMidiin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.13.2

### The `“buffer”` property

      “buffer”                   gpointer

The buffer

Owner: AgsOssMidiin

Flags: Read

Since: 3.13.2

### The `“delay-factor”` property

      “delay-factor”             double

tact

Owner: AgsOssMidiin

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.13.2

### The `“device”` property

      “device”                   char *

The OSS sequencer indentifier

Owner: AgsOssMidiin

Flags: Read / Write

Default value: "/dev/midi00"

Since: 3.13.2