File: WavFormatMap.cpp

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 (90 lines) | stat: -rw-r--r-- 4,800 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/***************************************************************************
       WavFormatMap.cpp  -  list of known wav file formats
                             -------------------
    begin                : Apr 28 2002
    copyright            : (C) 2002 by Thomas Eschenbacher
    email                : Thomas Eschenbacher <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.                                   *
 *                                                                         *
 ***************************************************************************/

#include "config.h"

#include <QString>

#include "libkwave/String.h"

#include "WavFormatMap.h"

//***************************************************************************
Kwave::WavFormatMap::WavFormatMap()
{
#define FMT(x,y) insert(WAVE_FORMAT_##x,_(y));
    FMT(UNKNOWN             ," Unknown; Microsoft Corporation ")
    FMT(PCM                 ," Microsoft PCM format ")
    FMT(MS_ADPCM            ," Microsoft ADPCM ")
    FMT(IEEE_FLOAT          ," Microsoft 32 bit float format ")
    FMT(IBM_CVSD            ," IBM Corporation ")
    FMT(ALAW                ," A-Law; Microsoft Corporation ")
    FMT(MULAW               ," U-Law; Microsoft Corporation ")
    FMT(OKI_ADPCM           ," ADPCM; OKI ")
    FMT(IMA_ADPCM           ," ADPCM; Intel Corporation ")
    FMT(MEDIASPACE_ADPCM    ," ADPCM; Videologic ")
    FMT(SIERRA_ADPCM        ," ADPCM; Sierra Semiconductor Corp ")
    FMT(G723_ADPCM          ," G723 ADPCM; Antex Electronics Corporation ")
    FMT(DIGISTD             ," DIGISTD; DSP Solutions, Inc. ")
    FMT(DIGIFIX             ," DIGIFIX; DSP Solutions, Inc. ")
    FMT(DIALOGIC_OKI_ADPCM  ," OKI ADPCM; Dialogic Corporation  ")
    FMT(MEDIAVISION_ADPCM   ," ADPCM; Media Vision, Inc. ")
    FMT(YAMAHA_ADPCM        ," ADPCM; Yamaha Corporation of America ")
    FMT(SONARC              ," SONARC; Speech Compression ")
    FMT(DSPGROUP_TRUESPEECH ," Truespeech; DSP Group, Inc ")
    FMT(ECHOSC1             ," SC1; Echo Speech Corporation ")
    FMT(AUDIOFILE_AF18      ," AF18; Audiofile, Inc. ")
    FMT(APTX                ," APTX; Audio Processing Technology ")
    FMT(AUDIOFILE_AF10      ," AF10; Audiofile, Inc. ")
    FMT(DOLBY_AC2           ," Dolby AC2; Dolby Laboratories ")
    FMT(GSM610              ," GSM610; Microsoft Corporation ")
    FMT(MSNAUDIO            ," MSN audio; Microsoft Corporation ")
    FMT(ANTEX_ADPCME        ," ADPCME; Antex Electronics Corporation ")
    FMT(CONTROL_RES_VQLPC   ," RES VQLPC; Control Resources Limited ")
    FMT(DIGIREAL            ," DigiReal; DSP Solutions, Inc. ")
    FMT(DIGIADPCM           ," DigiADPCM; DSP Solutions, Inc. ")
    FMT(CONTROL_RES_CR10    ," Res CR10; Control Resources Limited ")
    FMT(NMS_VBXADPCM        ," VBCADPCM; Natural MicroSystems ")
    FMT(ROCKWELL_ADPCM      ," ADPCM; Rockwell International ")
    FMT(ROCKWELL_DIGITALK   ," DigiTalk; Rockwell International ")
    FMT(G721_ADPCM          ," G721 ADPCM; Antex Electronics Corporation ")
    FMT(MPEG                ," MPEG; Microsoft Corporation ")
    FMT(MPEGLAYER3          ," MPEG 3 Layer 1 ")
    FMT(IBM_MULAW           ," IBM mu-law format ")
    FMT(IBM_ALAW            ," IBM a-law format ")
    FMT(IBM_ADPCM           ," IBM AVC Adaptive Differential PCM format ")
    FMT(CREATIVE_ADPCM      ," ADPCM; Creative Labs, Inc ")
    FMT(FM_TOWNS_SND        ," FM TOWNS SND; Fujitsu Corp. ")
    FMT(OLIGSM              ," GSM; Ing C. Olivetti & C., S.p.A. ")
    FMT(OLIADPCM            ," ADPCM; Ing C. Olivetti & C., S.p.A. ")
    FMT(OLICELP             ," CELP; Ing C. Olivetti & C., S.p.A. ")
    FMT(OLISBC              ," SBC; Ing C. Olivetti & C., S.p.A. ")
    FMT(OLIOPR              ," OPR; Ing C. Olivetti & C., S.p.A. ")
    FMT(EXTENSIBLE          ," Extensible ")
#undef FMT
}

//***************************************************************************
const QString &Kwave::WavFormatMap::findName(unsigned int id)
{
    if (!contains(static_cast<Kwave::wav_format_id>(id)))
        return (*this)[WAVE_FORMAT_UNKNOWN];
    return (*this)[static_cast<Kwave::wav_format_id>(id)];
}

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