···11-/***************************************************************************
22- * __________ __ ___.
33- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
44- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77- * \/ \/ \/ \/ \/
88- * $Id$
99- *
1010- * Copyright (C) 2008 by Maurus Cuelenaere
1111- *
1212- * All files in this archive are subject to the GNU General Public License.
1313- * See the file COPYING in the source tree root for full license agreement.
1414- *
1515- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1616- * KIND, either express or implied.
1717- *
1818- ****************************************************************************/
1919-2020-#ifndef CREATIVE_H_
2121-#define CREATIVE_H_
2222-2323-enum
2424-{
2525- ZENVISIONM = 0,
2626- ZENVISIONM60 = 1,
2727- ZENVISION = 2,
2828- ZENV = 3,
2929- ZEN = 4
3030-};
3131-3232-struct device_info
3333-{
3434- const char* cinf; /*Must be Unicode encoded*/
3535- const unsigned int cinf_size;
3636- const char* null;
3737- const unsigned char* bootloader;
3838- const unsigned int bootloader_size;
3939- const unsigned int memory_address;
4040-};
4141-4242-int zvm_encode(char *iname, char *oname, int device);
4343-4444-#endif /*CREATIVE_H_*/
11+/***************************************************************************
22+ * __________ __ ___.
33+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
44+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77+ * \/ \/ \/ \/ \/
88+ * $Id$
99+ *
1010+ * Copyright (C) 2008 by Maurus Cuelenaere
1111+ *
1212+ * All files in this archive are subject to the GNU General Public License.
1313+ * See the file COPYING in the source tree root for full license agreement.
1414+ *
1515+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1616+ * KIND, either express or implied.
1717+ *
1818+ ****************************************************************************/
1919+2020+#ifndef CREATIVE_H_
2121+#define CREATIVE_H_
2222+2323+enum
2424+{
2525+ ZENVISIONM = 0,
2626+ ZENVISIONM60 = 1,
2727+ ZENVISION = 2,
2828+ ZENV = 3,
2929+ ZEN = 4
3030+};
3131+3232+struct device_info
3333+{
3434+ const char* cinf; /*Must be Unicode encoded*/
3535+ const unsigned int cinf_size;
3636+ const char* null;
3737+ const unsigned char* bootloader;
3838+ const unsigned int bootloader_size;
3939+ const unsigned int memory_address;
4040+};
4141+4242+int zvm_encode(char *iname, char *oname, int device);
4343+4444+#endif /*CREATIVE_H_*/
+123-123
tools/hmac-sha1.h
···11-/* Taken from gnulib (http://savannah.gnu.org/projects/gnulib/) */
22-/* Declarations of functions and data types used for SHA1 sum
33- library functions.
44- Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
55-66- This program is free software; you can redistribute it and/or modify it
77- under the terms of the GNU General Public License as published by the
88- Free Software Foundation; either version 2, or (at your option) any
99- later version.
1010-1111- This program is distributed in the hope that it will be useful,
1212- but WITHOUT ANY WARRANTY; without even the implied warranty of
1313- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414- GNU General Public License for more details.
1515-1616- You should have received a copy of the GNU General Public License
1717- along with this program; if not, write to the Free Software Foundation,
1818- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
1919-2020-#ifndef SHA1_H
2121-#define SHA1_H 1
2222-2323-#include <stdio.h>
2424-#include <stdint.h>
2525-2626-/* Structure to save state of computation between the single steps. */
2727-struct sha1_ctx
2828-{
2929- uint32_t A;
3030- uint32_t B;
3131- uint32_t C;
3232- uint32_t D;
3333- uint32_t E;
3434-3535- uint32_t total[2];
3636- uint32_t buflen;
3737- uint32_t buffer[32];
3838-};
3939-4040-4141-/* Initialize structure containing state of computation. */
4242-extern void sha1_init_ctx (struct sha1_ctx *ctx);
4343-4444-/* Starting with the result of former calls of this function (or the
4545- initialization function update the context for the next LEN bytes
4646- starting at BUFFER.
4747- It is necessary that LEN is a multiple of 64!!! */
4848-extern void sha1_process_block (const void *buffer, size_t len,
4949- struct sha1_ctx *ctx);
5050-5151-/* Starting with the result of former calls of this function (or the
5252- initialization function update the context for the next LEN bytes
5353- starting at BUFFER.
5454- It is NOT required that LEN is a multiple of 64. */
5555-extern void sha1_process_bytes (const void *buffer, size_t len,
5656- struct sha1_ctx *ctx);
5757-5858-/* Process the remaining bytes in the buffer and put result from CTX
5959- in first 20 bytes following RESBUF. The result is always in little
6060- endian byte order, so that a byte-wise output yields to the wanted
6161- ASCII representation of the message digest.
6262-6363- IMPORTANT: On some systems it is required that RESBUF be correctly
6464- aligned for a 32 bits value. */
6565-extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
6666-6767-6868-/* Put result from CTX in first 20 bytes following RESBUF. The result is
6969- always in little endian byte order, so that a byte-wise output yields
7070- to the wanted ASCII representation of the message digest.
7171-7272- IMPORTANT: On some systems it is required that RESBUF is correctly
7373- aligned for a 32 bits value. */
7474-extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
7575-7676-7777-/* Compute SHA1 message digest for bytes read from STREAM. The
7878- resulting message digest number will be written into the 20 bytes
7979- beginning at RESBLOCK. */
8080-extern int sha1_stream (FILE *stream, void *resblock);
8181-8282-/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
8383- result is always in little endian byte order, so that a byte-wise
8484- output yields to the wanted ASCII representation of the message
8585- digest. */
8686-extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
8787-8888-#endif
8989-9090-9191-/* hmac.h -- hashed message authentication codes
9292- Copyright (C) 2005 Free Software Foundation, Inc.
9393-9494- This program is free software; you can redistribute it and/or modify
9595- it under the terms of the GNU General Public License as published by
9696- the Free Software Foundation; either version 2, or (at your option)
9797- any later version.
9898-9999- This program is distributed in the hope that it will be useful,
100100- but WITHOUT ANY WARRANTY; without even the implied warranty of
101101- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102102- GNU General Public License for more details.
103103-104104- You should have received a copy of the GNU General Public License
105105- along with this program; if not, write to the Free Software Foundation,
106106- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
107107-108108-/* Written by Simon Josefsson. */
109109-110110-#ifndef HMAC_H
111111-#define HMAC_H 1
112112-113113-#include <stddef.h>
114114-115115-/* Compute Hashed Message Authentication Code with SHA-1, over BUFFER
116116- data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the
117117- output to pre-allocated 20 byte minimum RESBUF buffer. Return 0 on
118118- success. */
119119-int
120120-hmac_sha1 (const void *key, size_t keylen,
121121- const void *in, size_t inlen, void *resbuf);
122122-123123-#endif /* HMAC_H */
11+/* Taken from gnulib (http://savannah.gnu.org/projects/gnulib/) */
22+/* Declarations of functions and data types used for SHA1 sum
33+ library functions.
44+ Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
55+66+ This program is free software; you can redistribute it and/or modify it
77+ under the terms of the GNU General Public License as published by the
88+ Free Software Foundation; either version 2, or (at your option) any
99+ later version.
1010+1111+ This program is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with this program; if not, write to the Free Software Foundation,
1818+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
1919+2020+#ifndef SHA1_H
2121+#define SHA1_H 1
2222+2323+#include <stdio.h>
2424+#include <stdint.h>
2525+2626+/* Structure to save state of computation between the single steps. */
2727+struct sha1_ctx
2828+{
2929+ uint32_t A;
3030+ uint32_t B;
3131+ uint32_t C;
3232+ uint32_t D;
3333+ uint32_t E;
3434+3535+ uint32_t total[2];
3636+ uint32_t buflen;
3737+ uint32_t buffer[32];
3838+};
3939+4040+4141+/* Initialize structure containing state of computation. */
4242+extern void sha1_init_ctx (struct sha1_ctx *ctx);
4343+4444+/* Starting with the result of former calls of this function (or the
4545+ initialization function update the context for the next LEN bytes
4646+ starting at BUFFER.
4747+ It is necessary that LEN is a multiple of 64!!! */
4848+extern void sha1_process_block (const void *buffer, size_t len,
4949+ struct sha1_ctx *ctx);
5050+5151+/* Starting with the result of former calls of this function (or the
5252+ initialization function update the context for the next LEN bytes
5353+ starting at BUFFER.
5454+ It is NOT required that LEN is a multiple of 64. */
5555+extern void sha1_process_bytes (const void *buffer, size_t len,
5656+ struct sha1_ctx *ctx);
5757+5858+/* Process the remaining bytes in the buffer and put result from CTX
5959+ in first 20 bytes following RESBUF. The result is always in little
6060+ endian byte order, so that a byte-wise output yields to the wanted
6161+ ASCII representation of the message digest.
6262+6363+ IMPORTANT: On some systems it is required that RESBUF be correctly
6464+ aligned for a 32 bits value. */
6565+extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
6666+6767+6868+/* Put result from CTX in first 20 bytes following RESBUF. The result is
6969+ always in little endian byte order, so that a byte-wise output yields
7070+ to the wanted ASCII representation of the message digest.
7171+7272+ IMPORTANT: On some systems it is required that RESBUF is correctly
7373+ aligned for a 32 bits value. */
7474+extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
7575+7676+7777+/* Compute SHA1 message digest for bytes read from STREAM. The
7878+ resulting message digest number will be written into the 20 bytes
7979+ beginning at RESBLOCK. */
8080+extern int sha1_stream (FILE *stream, void *resblock);
8181+8282+/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
8383+ result is always in little endian byte order, so that a byte-wise
8484+ output yields to the wanted ASCII representation of the message
8585+ digest. */
8686+extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
8787+8888+#endif
8989+9090+9191+/* hmac.h -- hashed message authentication codes
9292+ Copyright (C) 2005 Free Software Foundation, Inc.
9393+9494+ This program is free software; you can redistribute it and/or modify
9595+ it under the terms of the GNU General Public License as published by
9696+ the Free Software Foundation; either version 2, or (at your option)
9797+ any later version.
9898+9999+ This program is distributed in the hope that it will be useful,
100100+ but WITHOUT ANY WARRANTY; without even the implied warranty of
101101+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102102+ GNU General Public License for more details.
103103+104104+ You should have received a copy of the GNU General Public License
105105+ along with this program; if not, write to the Free Software Foundation,
106106+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
107107+108108+/* Written by Simon Josefsson. */
109109+110110+#ifndef HMAC_H
111111+#define HMAC_H 1
112112+113113+#include <stddef.h>
114114+115115+/* Compute Hashed Message Authentication Code with SHA-1, over BUFFER
116116+ data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the
117117+ output to pre-allocated 20 byte minimum RESBUF buffer. Return 0 on
118118+ success. */
119119+int
120120+hmac_sha1 (const void *key, size_t keylen,
121121+ const void *in, size_t inlen, void *resbuf);
122122+123123+#endif /* HMAC_H */
+1-1
tools/mkinfo.pl
···55# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77# \/ \/ \/ \/ \/
88-# $Id: configure 13215 2007-04-20 11:58:39Z bagder $
88+# $Id$
99#
1010# Purpose: extract and gather info from a build and put that in a standard
1111# way in the output file. Meant to be put in rockbox zip package to help and
-29
tools/sapi5_init_tts.vbs
···11-'***************************************************************************
22-' __________ __ ___.
33-' Open \______ \ ____ ____ | | _\_ |__ _______ ___
44-' Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55-' Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66-' Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77-' \/ \/ \/ \/ \/
88-' $Id: sapi5_init_tts.vbs$
99-'
1010-' Copyright (C) 2007 Steve Bavin, Jens Arnold, Mesar Hameed
1111-'
1212-' All files in this archive are subject to the GNU General Public License.
1313-' See the file COPYING in the source tree root for full license agreement.
1414-'
1515-' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1616-' KIND, either express or implied.
1717-'
1818-'***************************************************************************
1919-Dim oSpVoice, sVoice
2020-2121-Set oSpVoice = CreateObject("SAPI.SpVoice")
2222-If Err.Number <> 0 Then
2323- WScript.Echo "Error - could not get SpVoice object. " & _
2424- "SAPI 5 not installed?"
2525- Err.Clear
2626- WScript.Quit 1
2727-End If
2828-2929-WScript.Quit 0
-18
tools/sapi5_stop_tts.vbs
···11-'***************************************************************************
22-' __________ __ ___.
33-' Open \______ \ ____ ____ | | _\_ |__ _______ ___
44-' Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55-' Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66-' Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77-' \/ \/ \/ \/ \/
88-' $Id: sapi5_stop_tts.vbs$
99-'
1010-' Copyright (C) 2007 Steve Bavin, Jens Arnold, Mesar Hameed
1111-'
1212-' All files in this archive are subject to the GNU General Public License.
1313-' See the file COPYING in the source tree root for full license agreement.
1414-'
1515-' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1616-' KIND, either express or implied.
1717-'
1818-'***************************************************************************
-68
tools/sapi5_voice.vbs
···11-'***************************************************************************
22-' __________ __ ___.
33-' Open \______ \ ____ ____ | | _\_ |__ _______ ___
44-' Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55-' Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66-' Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77-' \/ \/ \/ \/ \/
88-' $Id: sapi5_voice.vbs$
99-'
1010-' Copyright (C) 2007 Steve Bavin, Jens Arnold, Mesar Hameed
1111-'
1212-' All files in this archive are subject to the GNU General Public License.
1313-' See the file COPYING in the source tree root for full license agreement.
1414-'
1515-' This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1616-' KIND, either express or implied.
1717-'
1818-'***************************************************************************
1919-' Purpose: Make a voice clip file for the given text
2020-' Parameters: $0 - text to convert
2121-' $1 - file to write spoken text into (WAV format)
2222-2323-2424-2525-'To be done:
2626-' - Somehow, persist oSpVoice across multiple clips to increase speed
2727-' - Allow user to override voice, speed and/or format (currently uses Control Panel defaults for voice/speed)
2828-' - Voice specific replacements/corrections for pronounciation (this should be at a higher level really)
2929-3030-Const SSFMCreateForWrite = 3
3131-3232-Const SPSF_8kHz16BitMono = 6
3333-Const SPSF_11kHz16BitMono = 10
3434-Const SPSF_12kHz16BitMono = 14
3535-Const SPSF_16kHz16BitMono = 18
3636-Const SPSF_22kHz16BitMono = 22
3737-Const SPSF_24kHz16BitMono = 26
3838-Const SPSF_32kHz16BitMono = 30
3939-Const SPSF_44kHz16BitMono = 34
4040-Const SPSF_48kHz16BitMono = 38
4141-4242-Dim oSpVoice, oSpFS, nAudioFormat, sText, sOutputFile
4343-4444-sText = Replace(WScript.Arguments(0), "\", "")
4545-sOutputFile = WScript.Arguments(1)
4646-nAudioFormat = SPSF_22kHz16BitMono 'Audio format to use, recommended settings:
4747- '- for AT&T natural voices, use SPSF_32kHz16BitMono
4848- '- for MS voices, use SPSF_22kHz16BitMono
4949-5050-Set oSpVoice = CreateObject("SAPI.SpVoice")
5151-If Err.Number <> 0 Then
5252- WScript.Echo "Error - could not get SpVoice object. " & _
5353- "SAPI 5 not installed?"
5454- Err.Clear
5555- WScript.Quit 1
5656-End If
5757-5858-Set oSpFS = CreateObject("SAPI.SpFileStream")
5959-oSpFS.Format.Type = nAudioFormat
6060-oSpFS.Open sOutputFile, SSFMCreateForWrite, False
6161-Set oSpVoice.AudioOutputStream = oSpFS
6262-oSpVoice.Speak sText
6363-oSpFS.Close
6464-6565-Set oSpFS = Nothing
6666-Set oSpVoice = Nothing
6767-Set oArgs = Nothing
6868-WScript.Quit 0