Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
3f47df20
Commit
3f47df20
authored
Jul 17, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for detailed control over data conversion when decoding.
parent
0d6bcd1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
mini_al.h
mini_al.h
+24
-14
No files found.
mini_al.h
View file @
3f47df20
// Audio playback and capture library. Public domain. See "unlicense" statement at the end of this file.
// Audio playback and capture library. Public domain. See "unlicense" statement at the end of this file.
// mini_al - v0.8.
3 - 2018-07-15
// mini_al - v0.8.
4-rc - 2018-xx-xx
//
//
// David Reid - davidreidsoftware@gmail.com
// David Reid - davidreidsoftware@gmail.com
...
@@ -929,6 +929,12 @@ typedef enum
...
@@ -929,6 +929,12 @@ typedef enum
mal_src_sinc_window_function_default = mal_src_sinc_window_function_hann
mal_src_sinc_window_function_default = mal_src_sinc_window_function_hann
} mal_src_sinc_window_function;
} mal_src_sinc_window_function;
typedef struct
{
mal_src_sinc_window_function windowFunction;
mal_uint32 windowWidth;
} mal_src_config_sinc;
typedef struct
typedef struct
{
{
mal_uint32 sampleRateIn;
mal_uint32 sampleRateIn;
...
@@ -944,11 +950,7 @@ typedef struct
...
@@ -944,11 +950,7 @@ typedef struct
void* pUserData;
void* pUserData;
union
union
{
{
struct
mal_src_config_sinc sinc;
{
mal_src_sinc_window_function windowFunction;
mal_uint32 windowWidth;
} sinc;
};
};
} mal_src_config;
} mal_src_config;
...
@@ -1007,11 +1009,7 @@ typedef struct
...
@@ -1007,11 +1009,7 @@ typedef struct
void* pUserData;
void* pUserData;
union
union
{
{
struct
mal_src_config_sinc sinc;
{
mal_src_sinc_window_function windowFunction;
mal_uint32 windowWidth;
} sinc;
};
};
} mal_dsp_config;
} mal_dsp_config;
...
@@ -2422,6 +2420,13 @@ typedef struct
...
@@ -2422,6 +2420,13 @@ typedef struct
mal_uint32 channels; // Set to 0 to use the stream's internal channels.
mal_uint32 channels; // Set to 0 to use the stream's internal channels.
mal_uint32 sampleRate; // Set to 0 to use the stream's internal sample rate.
mal_uint32 sampleRate; // Set to 0 to use the stream's internal sample rate.
mal_channel channelMap[MAL_MAX_CHANNELS];
mal_channel channelMap[MAL_MAX_CHANNELS];
mal_channel_mix_mode channelMixMode;
mal_dither_mode ditherMode;
mal_src_algorithm srcAlgorithm;
union
{
mal_src_config_sinc sinc;
} src;
} mal_decoder_config;
} mal_decoder_config;
struct mal_decoder
struct mal_decoder
...
@@ -24273,6 +24278,11 @@ mal_result mal_decoder__init_dsp(mal_decoder* pDecoder, const mal_decoder_config
...
@@ -24273,6 +24278,11 @@ mal_result mal_decoder__init_dsp(mal_decoder* pDecoder, const mal_decoder_config
pDecoder->internalFormat, pDecoder->internalChannels, pDecoder->internalSampleRate, pDecoder->internalChannelMap,
pDecoder->internalFormat, pDecoder->internalChannels, pDecoder->internalSampleRate, pDecoder->internalChannelMap,
pDecoder->outputFormat, pDecoder->outputChannels, pDecoder->outputSampleRate, pDecoder->outputChannelMap,
pDecoder->outputFormat, pDecoder->outputChannels, pDecoder->outputSampleRate, pDecoder->outputChannelMap,
onRead, pDecoder);
onRead, pDecoder);
dspConfig.channelMixMode = pConfig->channelMixMode;
dspConfig.ditherMode = pConfig->ditherMode;
dspConfig.srcAlgorithm = pConfig->srcAlgorithm;
dspConfig.sinc = pConfig->src.sinc;
return mal_dsp_init(&dspConfig, &pDecoder->dsp);
return mal_dsp_init(&dspConfig, &pDecoder->dsp);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment