summaryrefslogtreecommitdiff
path: root/core/applets/vmemo
Unidiff
Diffstat (limited to 'core/applets/vmemo') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 83c148f..fe8ebfd 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -1,63 +1,60 @@
1/************************************************************************************ 1/************************************************************************************
2 ** 2 **
3 ** This file may be distributed and/or modified under the terms of the 3 ** This file may be distributed and/or modified under the terms of the
4 ** GNU General Public License version 2 as published by the Free Software 4 ** GNU General Public License version 2 as published by the Free Software
5 ** Foundation and appearing in the file LICENSE.GPL included in the 5 ** Foundation and appearing in the file LICENSE.GPL included in the
6 ** packaging of this file. 6 ** packaging of this file.
7 ** 7 **
8 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 8 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 9 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 ** 10 **
11 ************************************************************************************/ 11 ************************************************************************************/
12// copyright 2002 Jeremy Cowgar <jc@cowgar.com> 12// copyright 2002 Jeremy Cowgar <jc@cowgar.com>
13/*
14 * $Id$
15*/
16// copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com> 13// copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com>
17 14
18extern "C" { 15extern "C" {
19#include "adpcm.h" 16#include "adpcm.h"
20} 17}
21 18
22#include <unistd.h> 19#include <unistd.h>
23#include <stdio.h> 20#include <stdio.h>
24#include <fcntl.h> 21#include <fcntl.h>
25#include <sys/ioctl.h> 22#include <sys/ioctl.h>
26#include <linux/soundcard.h> 23#include <linux/soundcard.h>
27 24
28#include <errno.h> 25#include <errno.h>
29 26
30typedef struct _waveheader { 27typedef struct _waveheader {
31 u_long main_chunk; /* 'RIFF' */ 28 u_long main_chunk; /* 'RIFF' */
32 u_long length; /* filelen */ 29 u_long length; /* filelen */
33 u_long chunk_type; /* 'WAVE' */ 30 u_long chunk_type; /* 'WAVE' */
34 u_long sub_chunk; /* 'fmt ' */ 31 u_long sub_chunk; /* 'fmt ' */
35 u_long sc_len; /* length of sub_chunk, =16 32 u_long sc_len; /* length of sub_chunk, =16
36 (chunckSize) format len */ 33 (chunckSize) format len */
37 u_short format; /* should be 1 for PCM-code (formatTag) */ 34 u_short format; /* should be 1 for PCM-code (formatTag) */
38 35
39 u_short modus; /* 1 Mono, 2 Stereo (channels) */ 36 u_short modus; /* 1 Mono, 2 Stereo (channels) */
40 u_long sample_fq; /* samples per second (samplesPerSecond) */ 37 u_long sample_fq; /* samples per second (samplesPerSecond) */
41 u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ 38 u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */
42 u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ 39 u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */
43 u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ 40 u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */
44 41
45 u_long data_chunk; /* 'data' */ 42 u_long data_chunk; /* 'data' */
46 43
47 u_long data_length;/* samplecount */ 44 u_long data_length;/* samplecount */
48} WaveHeader; 45} WaveHeader;
49 46
50#define RIFF 0x46464952 47#define RIFF 0x46464952
51#define WAVE 0x45564157 48#define WAVE 0x45564157
52#define FMT 0x20746D66 49#define FMT 0x20746D66
53#define DATA 0x61746164 50#define DATA 0x61746164
54#define PCM_CODE 1 51#define PCM_CODE 1
55#define WAVE_MONO 1 52#define WAVE_MONO 1
56#define WAVE_STEREO 2 53#define WAVE_STEREO 2
57 54
58struct adpcm_state encoder_state; 55struct adpcm_state encoder_state;
59//struct adpcm_state decoder_state; 56//struct adpcm_state decoder_state;
60 57
61#define WAVE_FORMAT_DVI_ADPCM (0x0011) 58#define WAVE_FORMAT_DVI_ADPCM (0x0011)
62#define WAVE_FORMAT_PCM (0x0001) 59#define WAVE_FORMAT_PCM (0x0001)
63 60