Skip to content

Commit

Permalink
release 1.30 with miniaudio 0.10.11
Browse files Browse the repository at this point in the history
changed build configuration: the wav, flac and mp3 decoders are now included into the miniaudio.h single header file directly
  • Loading branch information
irmen committed Jun 29, 2020
1 parent d5b91e2 commit 0375028
Show file tree
Hide file tree
Showing 7 changed files with 17,648 additions and 23,794 deletions.
25 changes: 5 additions & 20 deletions build_ffi_module.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
"""
Python interface to the miniaudio library (https://github.com/dr-soft/miniaudio)
This module Use CFFI to create the glue code but also to actually compile the decoders in one go!
Sound formats supported:
- ogg vorbis via stb_vorbis
- mp3 via dr_mp3
- wav via dr_wav
- flac via dr_flac
This module uses CFFI to create the glue code but also to actually compile the decoders in one go!
Sound formats supported: wav, mp3, flac, ogg vorbis
Author: Irmen de Jong (irmen@razorvine.net)
Software license: "MIT software license". See http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -795,23 +792,12 @@
#include <stdlib.h>
#define DR_FLAC_NO_OGG
#include "miniaudio/dr_flac.h"
#include "miniaudio/dr_wav.h"
#include "miniaudio/dr_mp3.h"
#ifndef NO_STB_VORBIS
#define STB_VORBIS_HEADER_ONLY
/* #define STB_VORBIS_NO_PUSHDATA_API */ /* needed by miniaudio decoding logic */
#include "miniaudio/stb_vorbis.c"
#endif
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio/miniaudio.h"
/* missing prototype? */
ma_uint64 ma_calculate_frame_count_after_resampling(ma_uint32 sampleRateOut, ma_uint32 sampleRateIn, ma_uint64 frameCountIn);
/* low-level initialization */
void init_miniaudio(void);
Expand All @@ -821,8 +807,7 @@
libraries=libraries,
extra_compile_args=compiler_args,
define_macros=[
("MA_NO_GENERATION", "1"),
("MA_NO_ENCODING", "1")
("MA_NO_GENERATION", "1")
]
)

Expand Down
36 changes: 7 additions & 29 deletions miniaudio.c
Original file line number Diff line number Diff line change
@@ -1,36 +1,14 @@
#include <stdlib.h>
#include <stdint.h>

#ifndef NO_STB_VORBIS
/* #define STB_VORBIS_NO_PUSHDATA_API */ /* needed by miniaudio decoding logic */
#define STB_VORBIS_HEADER_ONLY
#include "miniaudio/stb_vorbis.c"
#endif

/*
note: miniaudio itself is a single-header-file library,
and all definitions and code is already included in the
build_ffi_module bootstrap c module code
*/

#define DR_FLAC_IMPLEMENTATION
#define DR_FLAC_NO_OGG
#include "miniaudio/dr_flac.h"

#define DR_MP3_IMPLEMENTATION
#include "miniaudio/dr_mp3.h"

#define DR_WAV_IMPLEMENTATION
#include "miniaudio/dr_wav.h"

#define MINIAUDIO_IMPLEMENTATION
/* #define MA_NO_DECODING */
/* #define MA_NO_AAUDIO */
/* #define MA_NO_OPENSL */
/* #define MA_NO_JACK */
#define MA_NO_WEBAUDIO
#include "miniaudio/miniaudio.h"

#include <stdlib.h>
#include <stdint.h>

#ifndef NO_STB_VORBIS
#undef STB_VORBIS_HEADER_ONLY /* this time, do include vorbis implementation */
#include "miniaudio/stb_vorbis.c"
#endif


#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion miniaudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Software license: "MIT software license". See http://opensource.org/licenses/MIT
"""

__version__ = "1.23"
__version__ = "1.30"


import abc
Expand Down
Loading

0 comments on commit 0375028

Please sign in to comment.