File: OpusHeader.h

package info (click to toggle)
kwave 25.04.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,272 kB
  • sloc: cpp: 56,173; xml: 817; perl: 688; sh: 57; makefile: 11
file content (46 lines) | stat: -rw-r--r-- 2,159 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*************************************************************************
           OpusHeader.h  -  Opus stream header
                             -------------------
    begin                : Wed Dec 26 2012
    copyright            : (C) 2012 by Thomas Eschenbacher
    email                : Thomas.Eschenbacher@gmx.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef OPUS_HEADER_H
#define OPUS_HEADER_H

#include "config.h"

#include <QtGlobal>

namespace Kwave
{
    typedef struct {
        quint8  magic[8];        /**< stream magic, must be "OpusHead" */
        quint8  version;         /**< version number 2:6 bits          */
        quint8  channels;        /**< channels, 1...255                */
        quint16 preskip;         /**< preskip                          */
        quint32 sample_rate;     /**< sample rate [samples/sec]        */
        qint16  gain;            /**< gain in dB Q7.8 fixed point      */
        quint8  channel_mapping; /**< channel mapping used, 0 or 1     */

        /* only present if channel_mapping != 0 */
        quint8 streams;          /**< number of streams                */
        quint8 coupled;          /**< number of couplings              */
        quint8 map[255];         /**< stream to channel map            */
    } Q_PACKED opus_header_t;
}

#endif /* OPUS_HEADER_H */

//***************************************************************************
//***************************************************************************