1 /* Sound.h - an object that holds the sound structure
2 * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 //------------------------------------------------------------------------
29 soundEmbedded
, // embedded sound
30 soundExternal
// external sound
34 soundRaw
, // raw encoding
35 soundSigned
, // twos-complement values
36 soundMuLaw
, // mu-law-encoded samples
37 soundALaw
// A-law-encoded samples
43 // Try to parse the Object s
44 static Sound
*parseSound(Object
*s
);
49 Object
*getObject() { return streamObj
; }
52 SoundKind
getSoundKind() { return kind
; }
53 GooString
*getFileName() { return fileName
; }
54 double getSamplingRate() { return samplingRate
; }
55 int getChannels() { return channels
; }
56 int getBitsPerSample() { return bitsPerSample
; }
57 SoundEncoding
getEncoding() { return encoding
; }
62 // Create a sound. The Object obj is ensured to be a Stream with a Dict
63 Sound(Object
*obj
, bool readAttrs
= true);
71 SoundEncoding encoding
;