## OGMRipAudioCodec OGMRipAudioCodec — Base class for audio codecs |

## Functions

OGMDvdAudioStream * | ogmrip_audio_codec_get_dvd_audio_stream ()
void | ogmrip_audio_codec_set_dvd_audio_stream ()
gint | ogmrip_audio_codec_get_channels ()
void | ogmrip_audio_codec_set_channels ()
gboolean | ogmrip_audio_codec_get_fast ()
void | ogmrip_audio_codec_set_fast ()
const gchar * | ogmrip_audio_codec_get_label ()
void | ogmrip_audio_codec_set_label ()
gboolean | ogmrip_audio_codec_get_normalize ()
void | ogmrip_audio_codec_set_normalize ()
gint | ogmrip_audio_codec_get_quality ()
void | ogmrip_audio_codec_set_quality ()
gint | ogmrip_audio_codec_get_sample_rate ()
void | ogmrip_audio_codec_set_sample_rate ()
gint | ogmrip_audio_codec_get_samples_per_frame ()

## Properties

guint | channels | Read / Write
gboolean | fast | Read / Write
gboolean | normalize | Read / Write
guint | quality | Read / Write
guint | samples-per-frame | Read
gpointer | stream | Read / Write

## Types and Values

struct | OGMRipAudioCodec
struct | OGMRipAudioCodecClass

## Object Hierarchy

        GObject
        ╰── OGMJobSpawn
            ╰── OGMJobContainer
                ╰── OGMJobBin
                    ╰── OGMRipCodec
                        ╰── OGMRipAudioCodec

## Includes

    #include <ogmrip-audio-codec.h>

## Description

## Functions

### ogmrip_audio_codec_get_dvd_audio_stream ()

    OGMDvdAudioStream *
    ogmrip_audio_codec_get_dvd_audio_stream
                                   (OGMRipAudioCodec *audio);

Gets the audio stream to encode.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

an OGMDvdAudioStream, or NULL

### ogmrip_audio_codec_set_dvd_audio_stream ()

    void
    ogmrip_audio_codec_set_dvd_audio_stream
                                   (OGMRipAudioCodec *audio,
                                    OGMDvdAudioStream *stream);

Sets the audio stream to encode.

#### Parameters

audio | an OGMRipAudioCodec |
stream | an OGMDvdAudioStream |

### ogmrip_audio_codec_get_channels ()

    gint
    ogmrip_audio_codec_get_channels (OGMRipAudioCodec *audio);

Gets the number of channels of the output file.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

an OGMDvdAudioChannels, or -1

### ogmrip_audio_codec_set_channels ()

    void
    ogmrip_audio_codec_set_channels (OGMRipAudioCodec *audio,
                                     OGMDvdAudioChannels channels);

Sets the number of channels of the output file.

#### Parameters

audio | an OGMRipAudioCodec |
channels | an OGMDvdAudioChannels |

### ogmrip_audio_codec_get_fast ()

    gboolean
    ogmrip_audio_codec_get_fast (OGMRipAudioCodec *audio);

Returns whether to encode faster than realtime.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

`TRUE` if fast encoding is enabled

### ogmrip_audio_codec_set_fast ()

    void
    ogmrip_audio_codec_set_fast (OGMRipAudioCodec *audio,
                                 gboolean fast);

Sets whether to encode faster than realtime.

#### Parameters

audio | an OGMRipAudioCodec |
fast | `TRUE` to enable fast encoding |

### ogmrip_audio_codec_get_label ()

    const gchar *
    ogmrip_audio_codec_get_label (OGMRipAudioCodec *audio);

Gets the name of the track.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

the track name

### ogmrip_audio_codec_set_label ()

    void
    ogmrip_audio_codec_set_label (OGMRipAudioCodec *audio,
                                  const gchar *label);

Sets the name of the track.

#### Parameters

audio | an OGMRipAudioCodec |
label | the track name |

### ogmrip_audio_codec_get_normalize ()

    gboolean
    ogmrip_audio_codec_get_normalize (OGMRipAudioCodec *audio);

Returns whether the volume of the audio stream should be normalized.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

`TRUE` if normalization is enabled

### ogmrip_audio_codec_set_normalize ()

    void
    ogmrip_audio_codec_set_normalize (OGMRipAudioCodec *audio,
                                      gboolean normalize);

Sets whether to normalize the volume of the audio stream.

#### Parameters

audio | an OGMRipAudioCodec |
normalize | `TRUE` to enable normalization |

### ogmrip_audio_codec_get_quality ()

    gint
    ogmrip_audio_codec_get_quality (OGMRipAudioCodec *audio);

Gets the quality of the encoding, 0 for lowest, 10 for best.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

the quality, or -1

### ogmrip_audio_codec_set_quality ()

    void
    ogmrip_audio_codec_set_quality (OGMRipAudioCodec *audio,
                                    guint quality);

Sets the quality of the encoding, 0 for lowest, 10 for best.

#### Parameters

audio | an OGMRipAudioCodec |
quality | the quality of the encoding |

### ogmrip_audio_codec_get_sample_rate ()

    gint
    ogmrip_audio_codec_get_sample_rate (OGMRipAudioCodec *audio);

Gets the output sample rate.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

the sample rate

### ogmrip_audio_codec_set_sample_rate ()

    void
    ogmrip_audio_codec_set_sample_rate (OGMRipAudioCodec *audio,
                                        guint srate);

Sets the output sample rate to be used.

#### Parameters

audio | an OGMRipAudioCodec |
srate | the sample rate |

### ogmrip_audio_codec_get_samples_per_frame ()

    gint
    ogmrip_audio_codec_get_samples_per_frame
                                   (OGMRipAudioCodec *audio);

Gets the number of samples per frame.

#### Parameters

audio | an OGMRipAudioCodec |

#### Returns

the number of samples per frame, or -1

## Types and Values

### struct OGMRipAudioCodec

    struct OGMRipAudioCodec;

### struct OGMRipAudioCodecClass

    struct OGMRipAudioCodecClass {
      OGMRipCodecClass parent_class;

      /* vtable */
      gint (* get_samples_per_frame) (OGMRipAudioCodec *audio);
    };

## Property Details

### The `“channels”` property

      “channels”                 guint

Set channels.

Flags: Read / Write

Allowed values: <= 10

Default value: 1

### The `“fast”` property

      “fast”                     gboolean

Set fast.

Flags: Read / Write

Default value: FALSE

### The `“normalize”` property

      “normalize”                gboolean

Set normalize.

Flags: Read / Write

Default value: FALSE

### The `“quality”` property

      “quality”                  guint

Set quality.

Flags: Read / Write

Allowed values: <= 10

Default value: 3

### The `“samples-per-frame”` property

      “samples-per-frame”        guint

Set samples per frame.

Flags: Read

Default value: 512

### The `“stream”` property

      “stream”                   gpointer

Set audio stream.

Flags: Read / Write