RygelAudioItem: librygel-server Reference Manual

## RygelAudioItem RygelAudioItem — Represents an audio item contained in a file. |

## Functions

RygelAudioItem * | rygel_audio_item_new ()
glong | rygel_audio_item_get_duration ()
void | rygel_audio_item_set_duration ()
gint | rygel_audio_item_get_bitrate ()
void | rygel_audio_item_set_bitrate ()
gint | rygel_audio_item_get_sample_freq ()
void | rygel_audio_item_set_sample_freq ()
gint | rygel_audio_item_get_bits_per_sample ()
void | rygel_audio_item_set_bits_per_sample ()
gint | rygel_audio_item_get_channels ()
void | rygel_audio_item_set_channels ()
const gchar * | rygel_audio_item_get_album ()
void | rygel_audio_item_set_album ()

## Properties

gchar * | album | Read / Write
gint | bitrate | Read / Write
gint | bits-per-sample | Read / Write
gint | channels | Read / Write
glong | duration | Read / Write
gint | sample-freq | Read / Write

## Types and Values

#define | RYGEL_TYPE_AUDIO_ITEM
#define | RYGEL_AUDIO_ITEM_UPNP_CLASS
struct | RygelAudioItem
struct | RygelAudioItemClass

## Object Hierarchy

        GObject
        ╰── RygelMediaObject
            ╰── RygelMediaItem
                ╰── RygelMediaFileItem
                    ╰── RygelAudioItem
                        ├── RygelMusicItem
                        ╰── RygelVideoItem

## Description

## Functions

### rygel_audio_item_new ()

    RygelAudioItem *
    rygel_audio_item_new (const gchar *id,
                          RygelMediaContainer *parent,
                          const gchar *title,
                          const gchar *upnp_class);

#### Parameters

id |  |
parent |  |
title |  |
upnp_class |  |

### rygel_audio_item_get_duration ()

    glong
    rygel_audio_item_get_duration (RygelAudioItem *self);

Get and return the current value of the "duration" property.

The duration of the source content (this.uri) in seconds. A value of -1 means the duration is unknown

#### Parameters

self | the RygelAudioItem instance to query |

#### Returns

the value of the "duration" property

### rygel_audio_item_set_duration ()

    void
    rygel_audio_item_set_duration (RygelAudioItem *self,
                                   glong value);

Set the value of the "duration" property to `value` .

The duration of the source content (this.uri) in seconds. A value of -1 means the duration is unknown

#### Parameters

self | the RygelAudioItem instance to modify |
value | the new value of the "duration" property |

### rygel_audio_item_get_bitrate ()

    gint
    rygel_audio_item_get_bitrate (RygelAudioItem *self);

Get and return the current value of the "bitrate" property.

The bitrate of the source content (this.uri) in bytes/second. A value of -1 means the bitrate is unknown

#### Parameters

self | the RygelAudioItem instance to query |

#### Returns

the value of the "bitrate" property

### rygel_audio_item_set_bitrate ()

    void
    rygel_audio_item_set_bitrate (RygelAudioItem *self,
                                  gint value);

Set the value of the "bitrate" property to `value` .

The bitrate of the source content (this.uri) in bytes/second. A value of -1 means the bitrate is unknown

#### Parameters

self | the RygelAudioItem instance to modify |
value | the new value of the "bitrate" property |

### rygel_audio_item_get_sample_freq ()

    gint
    rygel_audio_item_get_sample_freq (RygelAudioItem *self);

Get and return the current value of the "sample-freq" property.

The sample frequency of the source content (this.uri) in Hz. A value of -1 means the sample frequency is unknown

#### Parameters

self | the RygelAudioItem instance to query |

#### Returns

the value of the "sample-freq" property

### rygel_audio_item_set_sample_freq ()

    void
    rygel_audio_item_set_sample_freq (RygelAudioItem *self,
                                      gint value);

Set the value of the "sample-freq" property to `value` .

The sample frequency of the source content (this.uri) in Hz. A value of -1 means the sample frequency is unknown

#### Parameters

self | the RygelAudioItem instance to modify |
value | the new value of the "sample-freq" property |

### rygel_audio_item_get_bits_per_sample ()

    gint
    rygel_audio_item_get_bits_per_sample (RygelAudioItem *self);

Get and return the current value of the "bits-per-sample" property.

The bits per sample of the source content (this.uri). A value of -1 means the bits per sample is unknown

#### Parameters

self | the RygelAudioItem instance to query |

#### Returns

the value of the "bits-per-sample" property

### rygel_audio_item_set_bits_per_sample ()

    void
    rygel_audio_item_set_bits_per_sample (RygelAudioItem *self,
                                          gint value);

Set the value of the "bits-per-sample" property to `value` .

The bits per sample of the source content (this.uri). A value of -1 means the bits per sample is unknown

#### Parameters

self | the RygelAudioItem instance to modify |
value | the new value of the "bits-per-sample" property |

### rygel_audio_item_get_channels ()

    gint
    rygel_audio_item_get_channels (RygelAudioItem *self);

Get and return the current value of the "channels" property.

The number of audio channels in the source content (this.uri). A value of -1 means the number of channels is unknown

#### Parameters

self | the RygelAudioItem instance to query |

#### Returns

the value of the "channels" property

### rygel_audio_item_set_channels ()

    void
    rygel_audio_item_set_channels (RygelAudioItem *self,
                                   gint value);

Set the value of the "channels" property to `value` .

The number of audio channels in the source content (this.uri). A value of -1 means the number of channels is unknown

#### Parameters

self | the RygelAudioItem instance to modify |
value | the new value of the "channels" property |

### rygel_audio_item_get_album ()

    const gchar *
    rygel_audio_item_get_album (RygelAudioItem *self);

Get and return the current value of the "album" property.

#### Parameters

self | the RygelAudioItem instance to query |

#### Returns

the value of the "album" property

### rygel_audio_item_set_album ()

    void
    rygel_audio_item_set_album (RygelAudioItem *self,
                                const gchar *value);

Set the value of the "album" property to `value` .

#### Parameters

self | the RygelAudioItem instance to modify |
value | the new value of the "album" property |

## Types and Values

### RYGEL_TYPE_AUDIO_ITEM

    #define RYGEL_TYPE_AUDIO_ITEM (rygel_audio_item_get_type ())

The type for RygelAudioItem.

### RYGEL_AUDIO_ITEM_UPNP_CLASS

    #define RYGEL_AUDIO_ITEM_UPNP_CLASS "object.item.audioItem"

### struct RygelAudioItem

    struct RygelAudioItem;

Represents an audio item contained in a file.

### struct RygelAudioItemClass

    struct RygelAudioItemClass {
    	RygelMediaFileItemClass parent_class;
    };

The class structure for `RYGEL_TYPE_AUDIO_ITEM`. All the fields in this structure are private and should never be accessed directly.

#### Members

## Property Details

### The `“album”` property

      “album”                    gchar *

album.

Flags: Read / Write

Default value: NULL

### The `“bitrate”` property

      “bitrate”                  gint

The bitrate of the source content (this.uri) in bytes/second. A value of -1 means the bitrate is unknown

Flags: Read / Write

Default value: -1

### The `“bits-per-sample”` property

      “bits-per-sample”          gint

The bits per sample of the source content (this.uri). A value of -1 means the bits per sample is unknown

Flags: Read / Write

Default value: -1

### The `“channels”` property

      “channels”                 gint

The number of audio channels in the source content (this.uri). A value of -1 means the number of channels is unknown

Flags: Read / Write

Default value: -1

### The `“duration”` property

      “duration”                 glong

The duration of the source content (this.uri) in seconds. A value of -1 means the duration is unknown

Flags: Read / Write

Default value: -1

### The `“sample-freq”` property

      “sample-freq”              gint

The sample frequency of the source content (this.uri) in Hz. A value of -1 means the sample frequency is unknown

Flags: Read / Write

Default value: -1