From: Monty Date: Mon, 14 Aug 2000 22:33:50 +0000 (+0000) Subject: Basic MacOS9 build support; libs and examples X-Git-Tag: v1.3.3~1165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=8b8e92ebb388a84c70e21d1e548fb068dcfefbf4;p=platform%2Fupstream%2Flibvorbis.git Basic MacOS9 build support; libs and examples Monty svn path=/trunk/vorbis/; revision=552 --- diff --git a/examples/decoder_example.c b/examples/decoder_example.c index 656bf80..e638fc1 100644 --- a/examples/decoder_example.c +++ b/examples/decoder_example.c @@ -12,7 +12,7 @@ ******************************************************************** function: simple example decoder - last mod: $Id: decoder_example.c,v 1.9 2000/06/15 09:18:34 xiphmont Exp $ + last mod: $Id: decoder_example.c,v 1.10 2000/08/14 22:33:50 xiphmont Exp $ ********************************************************************/ @@ -32,6 +32,10 @@ #include #endif +#if defined(macintosh) && defined(__MWERKS__) +#include /* CodeWarrior's Mac "command-line" support */ +#endif + int16_t convbuffer[4096]; /* take 8k out of the data segment, not the stack */ int convsize=4096; @@ -58,6 +62,13 @@ int main(int argc, char **argv){ _setmode( _fileno( stdout ), _O_BINARY ); #endif +#if defined(macintosh) && defined(__MWERKS__) + int argc = 0; + char **argv = NULL; + + argc = ccommand(&argv); /* get a "command line" from the Mac user */ + /* this also lets the user set stdin and stdout */ +#endif /********** Decode setup ************/ diff --git a/examples/encoder_example.c b/examples/encoder_example.c index 7963ce6..38070a9 100644 --- a/examples/encoder_example.c +++ b/examples/encoder_example.c @@ -12,7 +12,7 @@ ******************************************************************** function: simple example encoder - last mod: $Id: encoder_example.c,v 1.8 2000/06/15 09:18:34 xiphmont Exp $ + last mod: $Id: encoder_example.c,v 1.9 2000/08/14 22:33:50 xiphmont Exp $ ********************************************************************/ @@ -32,6 +32,9 @@ #include #endif +#if defined(macintosh) && defined(__MWERKS__) +#include /* CodeWarrior's Mac "command-line" support */ +#endif #define READ 1024 signed char readbuffer[READ*4+44]; /* out of the data segment, not the stack */ @@ -51,6 +54,13 @@ int main(){ int eos=0; +#if defined(macintosh) && defined(__MWERKS__) + int argc = 0; + char **argv = NULL; + argc = ccommand(&argv); /* get a "command line" from the Mac user */ + /* this also lets the user set stdin and stdout */ +#endif + /* we cheat on the WAV header; we just bypass 44 bytes and never verify that it matches 16bit/stereo/44.1kHz. This is just an example, after all. */ diff --git a/mac/compat/strdup.c b/mac/compat/strdup.c new file mode 100644 index 0000000..277574a --- /dev/null +++ b/mac/compat/strdup.c @@ -0,0 +1 @@ +#include #include #include char *strdup(const char *inStr) { char *outStr = NULL; if (inStr == NULL) { return NULL; } outStr = malloc(strlen(inStr) + 1); if (outStr != NULL) { strcpy(outStr, inStr); } return outStr; } \ No newline at end of file diff --git a/mac/compat/sys/types.h b/mac/compat/sys/types.h new file mode 100644 index 0000000..b0d4f92 --- /dev/null +++ b/mac/compat/sys/types.h @@ -0,0 +1 @@ +#ifndef __SYS_TYPES_H__ #define __SYS_TYPES_H__ 1 #include #include #include typedef short int16_t; typedef long int32_t; typedef long long int64_t; #define vorbis_size32_t long #if defined(__cplusplus) extern "C" { #endif #pragma options align=power char *strdup(const char *inStr); #pragma options align=reset #if defined(__cplusplus) } #endif #endif /* __SYS_TYPES_H__ */ \ No newline at end of file diff --git a/mac/decoder_example.mcp b/mac/decoder_example.mcp new file mode 100644 index 0000000..7857354 Binary files /dev/null and b/mac/decoder_example.mcp differ diff --git a/mac/encoder_example.mcp b/mac/encoder_example.mcp new file mode 100644 index 0000000..faf63cd Binary files /dev/null and b/mac/encoder_example.mcp differ diff --git a/mac/libvorbis.mcp b/mac/libvorbis.mcp new file mode 100644 index 0000000..2b5f5dc Binary files /dev/null and b/mac/libvorbis.mcp differ diff --git a/mac/libvorbis.mcp.exp b/mac/libvorbis.mcp.exp new file mode 100644 index 0000000..5ffc7c3 --- /dev/null +++ b/mac/libvorbis.mcp.exp @@ -0,0 +1 @@ +### From "vorbis/codec.h" ogg_stream_packetin ogg_stream_pageout ogg_sync_init ogg_sync_clear #ogg_sync_destroy ogg_sync_reset ogg_sync_buffer ogg_sync_wrote ogg_sync_pageseek ogg_sync_pageout ogg_stream_pagein ogg_stream_packetout ogg_stream_init ogg_stream_clear ogg_stream_reset ogg_stream_destroy ogg_stream_eof ogg_page_version ogg_page_continued ogg_page_bos ogg_page_eos ogg_page_frameno ogg_page_serialno ogg_page_pageno vorbis_info_init vorbis_info_clear vorbis_comment_init vorbis_comment_add vorbis_comment_clear vorbis_block_init vorbis_block_clear vorbis_dsp_clear vorbis_analysis_init vorbis_analysis_headerout vorbis_analysis_buffer vorbis_analysis_wrote vorbis_analysis_blockout vorbis_analysis vorbis_synthesis_headerin vorbis_synthesis_init vorbis_synthesis vorbis_synthesis_blockin vorbis_synthesis_pcmout vorbis_synthesis_read strdup \ No newline at end of file