mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-23 03:52:45 -05:00
commit asap codec. plays .sap files. At the moment it only plays the default song. So subSongs are ignored.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18121 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4e4bf82fb7
commit
25bb37bb68
18 changed files with 461 additions and 10 deletions
25
apps/codecs/asap/README.rockbox
Normal file
25
apps/codecs/asap/README.rockbox
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
Library: asap-1.2.0
|
||||
Imported: 2008-26-07 by Dominik Wenger
|
||||
|
||||
This directory contains a local version of asap (http://asap.sourceforge.net/) for decoding Atari 8bit .sap
|
||||
audio streams.
|
||||
|
||||
LICENSING INFORMATION
|
||||
|
||||
Asap is available under the terms of the GPL v2 or later
|
||||
license, which is both an open source and free software license.
|
||||
The Licence is the same as the rest of Rockbox.
|
||||
|
||||
|
||||
IMPORT DETAILS
|
||||
|
||||
The .[ch] files in apps/codec/asap are copied from ASAP.
|
||||
Some #defines were added, so it uses the ci-> Pointer.
|
||||
|
||||
A small modification was needed in asap.h Line 120.
|
||||
(changed the delta buffer to signed char)
|
||||
|
||||
Also players.h (contains binarys of players) was generated and copied
|
||||
into Rockbox.
|
||||
|
||||
|
||||
3
apps/codecs/asap/SOURCES
Normal file
3
apps/codecs/asap/SOURCES
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
acpu.c
|
||||
asap.c
|
||||
apokeysnd.c
|
||||
|
|
@ -20,13 +20,14 @@
|
|||
* along with ASAP; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "codeclib.h"
|
||||
#if !defined(JAVA) && !defined(CSHARP)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "asap_internal.h"
|
||||
|
||||
#define memset ci->memset
|
||||
#define ULTRASOUND_CYCLES 112
|
||||
|
||||
#define MUTE_FREQUENCY 1
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* along with ASAP; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "codeclib.h"
|
||||
#if !defined(JAVA) && !defined(CSHARP)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
|
@ -30,6 +30,14 @@
|
|||
#include "players.h"
|
||||
#endif
|
||||
|
||||
#define memcpy ci->memcpy
|
||||
#define memcmp ci->memcmp
|
||||
#define memset ci->memset
|
||||
#define strcpy ci->strcpy
|
||||
#define strcmp ci->strcmp
|
||||
#define strstr ci->strcasestr
|
||||
|
||||
|
||||
#define CMR_BASS_TABLE_OFFSET 0x70f
|
||||
|
||||
CONST_LOOKUP(byte, cmr_bass_table) = {
|
||||
|
|
@ -1012,7 +1020,7 @@ FILE_FUNC abool parse_sap_header(ASAP_ModuleInfo PTR module_info,
|
|||
i = 0;
|
||||
while (module[module_index] != 0x0d) {
|
||||
line[i++] = (char) module[module_index++];
|
||||
if (module_index >= module_len || i >= sizeof(line) - 1)
|
||||
if (module_index >= module_len || (unsigned)i >= sizeof(line) - 1)
|
||||
return FALSE;
|
||||
}
|
||||
if (++module_index >= module_len || module[module_index++] != 0x0a)
|
||||
|
|
@ -1719,6 +1727,7 @@ int ASAP_SetModuleInfo(const ASAP_ModuleInfo *module_info, const byte ARRAY modu
|
|||
const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info,
|
||||
const byte ARRAY module, int module_len)
|
||||
{
|
||||
(void)filename;
|
||||
switch (module_info->type) {
|
||||
case 'B':
|
||||
if (module_info->init == 0x4f3 || module_info->init == 0xf4f3 || module_info->init == 0x4ef)
|
||||
|
|
@ -1755,6 +1764,7 @@ const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_
|
|||
int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info,
|
||||
const byte ARRAY module, int module_len, byte ARRAY out_module)
|
||||
{
|
||||
(void) filename;
|
||||
int out_len;
|
||||
byte *dest;
|
||||
int addr;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ typedef struct {
|
|||
int delta3;
|
||||
int delta4;
|
||||
int skctl;
|
||||
char delta_buffer[888];
|
||||
signed char delta_buffer[888];
|
||||
} PokeyState;
|
||||
|
||||
/* Player state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue