Skip to content

Commit

Permalink
Add ogg and vorbis to NME_LOCAL_TOOLKIT
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugh Sanderson committed Jun 3, 2024
1 parent 58e2fac commit cc62a7a
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
[submodule "project/toolkit/jpeg/libjpeg-turbo"]
path = project/toolkit/jpeg/libjpeg-turbo
url = https://github.com/libjpeg-turbo/libjpeg-turbo
[submodule "project/toolkit/vorbis/vorbis"]
path = project/toolkit/vorbis/vorbis
url = https://github.com/xiph/vorbis.git
[submodule "project/toolkit/ogg/ogg"]
path = project/toolkit/ogg/ogg
url = https://github.com/xiph/ogg.git
18 changes: 12 additions & 6 deletions project/ToolkitBuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,24 @@
<include name="toolkit/zlib/files.xml" />
<include name="toolkit/png/files.xml" />
<include name="toolkit/jpeg/files.xml" />
<include name="toolkit/ogg/files.xml" />
<include name="toolkit/vorbis/files.xml" />
</section>

<section unless="NME_LOCAL_TOOLKIT">
<set name="NME_ZLIB" value="${NATIVE_TOOLKIT_PATH}/zlib/" />
<include name="${NME_ZLIB}/files.xml" />
<set name="NME_PNG" value="${NATIVE_TOOLKIT_PATH}/png/" />
<include name="${NME_PNG}/files.xml" />
<set name="NME_JPEG" value="${NATIVE_TOOLKIT_PATH}/jpeg/" />
<include name="${NME_JPEG}/files.xml" />
<set name="NME_OGG" value="${NATIVE_TOOLKIT_PATH}/ogg/" />
<include name="${NME_OGG}/files.xml" />
<set name="NME_VORBIS" value="${NATIVE_TOOLKIT_PATH}/vorbis/" />
<include name="${NME_VORBIS}/files.xml" />
</section>


<include name="${NATIVE_TOOLKIT_PATH}/ogg/files.xml" />
<include name="${NATIVE_TOOLKIT_PATH}/vorbis/files.xml" />
<include name="${NATIVE_TOOLKIT_PATH}/curl/files.xml" />
<include name="${NATIVE_TOOLKIT_PATH}/freetype/files.xml" />
<include name="${NATIVE_TOOLKIT_PATH}/sdl/files.xml" />
Expand Down Expand Up @@ -332,16 +337,17 @@

<compilerflag value="-I${NME_ZLIB}"/>
<compilerflag value="-I${NME_PNG}"/>
<compilerflag value="-I${NME_PNG}/.." if="NME_LOCAL_TOOLKIT" />
<compilerflag value="-I${NME_PNG}.." if="NME_LOCAL_TOOLKIT" />
<compilerflag value="-I${NME_JPEG}"/>
<compilerflag value="-I${NME_JPEG}/.." if="NME_LOCAL_TOOLKIT" />
<compilerflag value="-I${NME_JPEG}.." if="NME_LOCAL_TOOLKIT" />
<compilerflag value="-I${NME_VORBIS}include"/>
<compilerflag value="-I${NME_OGG}include"/>
<compilerflag value="-I${NME_OGG}.." if="NME_LOCAL_TOOLKIT" />

<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype"/>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/include"/>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/freetype/include"/>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/freetype/include/freetype"/>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/vorbis/include"/>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/ogg/include"/>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/modplug" if="modplug" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/curl/include" if="NME_CURL" />

Expand Down
26 changes: 26 additions & 0 deletions project/toolkit/ogg/config_types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef __CONFIG_TYPES_H__
#define __CONFIG_TYPES_H__


#ifdef BLACKBERRY

/* QNX */
# include <inttypes.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;

#else
# include <inttypes.h>

/* these are filled in by configure */
typedef int16_t ogg_int16_t;
typedef unsigned short ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef int64_t ogg_int64_t;

#endif
#endif
26 changes: 26 additions & 0 deletions project/toolkit/ogg/files.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<xml>

<set name="NME_OGG" value="${this_dir}/ogg/" />

<files id="native-toolkit-ogg-depends">
<depend name="${NME_OGG}include/ogg/ogg.h"/>
<depend name="${NME_OGG}include/ogg/os_types.h"/>
<depend name="${NME_OGG}../config_types.h"/>
</files>

<files id="native-toolkit-ogg" tags="" >

<compilerflag value="-I${NME_OGG}include/"/>
<compilerflag value="-I${NME_OGG}"/>
<cache value="1" />

<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />

<depend files="native-toolkit-ogg-depends" />

<file name="${NME_OGG}src/bitwise.c" />
<file name="${NME_OGG}src/framing.c" />

</files>

</xml>
1 change: 1 addition & 0 deletions project/toolkit/ogg/ogg
Submodule ogg added at db5c7a
72 changes: 72 additions & 0 deletions project/toolkit/vorbis/files.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<xml>

<set name="NME_VORBIS" value="${this_dir}/vorbis/" />

<files id="native-toolkit-vorbis-depends">
<depend name="${NME_VORBIS}include/vorbis/codec.h"/>
<depend name="${NME_VORBIS}include/vorbis/vorbisenc.h"/>
<depend name="${NME_VORBIS}include/vorbis/vorbisfile.h"/>
</files>

<files id="native-toolkit-vorbis" tags="" >

<cache value="1" />
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />

<depend files="native-toolkit-vorbis-depends"/>

<depend name="${NME_OGG}../config_types.h"/>
<depend name="${NME_OGG}include/ogg/ogg.h"/>
<depend name="${NME_OGG}include/ogg/os_types.h"/>

<depend name="${NME_VORBIS}lib/window.h"/>
<depend name="${NME_VORBIS}lib/smallft.h"/>
<depend name="${NME_VORBIS}lib/scales.h"/>
<depend name="${NME_VORBIS}lib/registry.h"/>
<depend name="${NME_VORBIS}lib/psy.h"/>
<depend name="${NME_VORBIS}lib/os.h"/>
<depend name="${NME_VORBIS}lib/misc.h"/>
<depend name="${NME_VORBIS}lib/mdct.h"/>
<depend name="${NME_VORBIS}lib/masking.h"/>
<depend name="${NME_VORBIS}lib/lsp.h"/>
<depend name="${NME_VORBIS}lib/lpc.h"/>
<depend name="${NME_VORBIS}lib/lookup_data.h"/>
<depend name="${NME_VORBIS}lib/lookup.h"/>
<depend name="${NME_VORBIS}lib/highlevel.h"/>
<depend name="${NME_VORBIS}lib/envelope.h"/>
<depend name="${NME_VORBIS}lib/codec_internal.h"/>
<depend name="${NME_VORBIS}lib/codebook.h"/>
<depend name="${NME_VORBIS}lib/bitrate.h"/>
<depend name="${NME_VORBIS}lib/backends.h"/>


<compilerflag value="-I${NME_VORBIS}include/"/>
<compilerflag value="-I${NME_VORBIS}lib/"/>
<compilerflag value="-I${NME_OGG}/include/"/>

<file name="${NME_VORBIS}lib/mdct.c"/>
<file name="${NME_VORBIS}lib/smallft.c"/>
<file name="${NME_VORBIS}lib/block.c"/>
<file name="${NME_VORBIS}lib/envelope.c"/>
<file name="${NME_VORBIS}lib/window.c"/>
<file name="${NME_VORBIS}lib/lsp.c"/>
<file name="${NME_VORBIS}lib/lpc.c"/>
<file name="${NME_VORBIS}lib/analysis.c"/>
<file name="${NME_VORBIS}lib/synthesis.c"/>
<file name="${NME_VORBIS}lib/psy.c"/>
<file name="${NME_VORBIS}lib/info.c"/>
<file name="${NME_VORBIS}lib/floor1.c"/>
<file name="${NME_VORBIS}lib/floor0.c"/>
<file name="${NME_VORBIS}lib/res0.c"/>
<file name="${NME_VORBIS}lib/mapping0.c"/>
<file name="${NME_VORBIS}lib/registry.c"/>
<file name="${NME_VORBIS}lib/codebook.c"/>
<file name="${NME_VORBIS}lib/sharedbook.c"/>
<!--<file name="${NME_VORBIS}lib/lookup.c"/>-->
<file name="${NME_VORBIS}lib/bitrate.c"/>
<file name="${NME_VORBIS}lib/vorbisfile.c"/>
<file name="${NME_VORBIS}lib/vorbisenc.c"/>

</files>

</xml>
1 change: 1 addition & 0 deletions project/toolkit/vorbis/vorbis
Submodule vorbis added at 84c023
2 changes: 2 additions & 0 deletions project/toolkit/zlib/files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<cache value="1" />
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />
<compilerflag value="-DSTDC" unless="windows" />
<compilerflag value="-DHAVE_UNISTD_H" unless="windows" />

<depend files="native-toolkit-zlib-depends"/>

Expand Down

0 comments on commit cc62a7a

Please sign in to comment.