If dircache and database "load to ram" is enabled then get the id3 info from the...
[kugel-rb.git] / rbutil / rbutilqt / base / ttscarbon.h
blobb2d39047a5ed8cd2d8b73feb5d1f4c8e75cf5e11
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2010 by Dominik Riebeling
10 * $Id$
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef TTSCARBON_H
21 #define TTSCARBON_H
23 #include <QtCore>
24 #include "ttsbase.h"
26 #include <Carbon/Carbon.h>
27 #include <inttypes.h>
29 class TTSCarbon : public TTSBase
31 Q_OBJECT
32 //! Enum to identify the settings
33 enum ConfigValuesCarbon
35 ConfigVoice,
36 ConfigSpeed
38 public:
39 TTSCarbon(QObject *parent = NULL);
41 //! Child class should generate a clip
42 TTSStatus voice(QString text,QString wavfile, QString* errStr);
43 //! Child class should do startup
44 bool start(QString *errStr);
45 //! child class should stop
46 bool stop() ;
48 // configuration
49 //! Child class should return true, when configuration is good
50 bool configOk();
51 //! Child class should generate and insertSetting(..) its settings
52 void generateSettings();
53 //! Chlid class should commit the Settings to permanent storage
54 void saveSettings();
56 private:
57 SpeechChannel m_channel;
58 CFStringBuiltInEncodings m_voiceScript;
60 unsigned long be2u32(unsigned char* buf);
61 unsigned long be2u16(unsigned char* buf);
62 unsigned char* u32tobuf(unsigned char* buf, uint32_t val);
63 unsigned char* u16tobuf(unsigned char* buf, uint16_t val);
64 unsigned int extended2int(unsigned char* buf);
65 int convertAiffToWav(const char* aiff, const char* wav);
68 protected:
69 // static QMap<QString,QString> ttsList;
72 #endif // TTSCARBON_H