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
a7837316
Commit
a7837316
authored
Feb 02, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
static-ify some APIs.
parent
862f66c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
miniaudio.h
miniaudio.h
+9
-9
No files found.
miniaudio.h
View file @
a7837316
...
@@ -4396,7 +4396,7 @@ char* ma_copy_string(const char* src)
...
@@ -4396,7 +4396,7 @@ char* ma_copy_string(const char* src)
}
}
void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes)
static MA_INLINE
void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes)
{
{
#if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX
#if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX
MA_COPY_MEMORY(dst, src, (size_t)sizeInBytes);
MA_COPY_MEMORY(dst, src, (size_t)sizeInBytes);
...
@@ -4416,7 +4416,7 @@ void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes)
...
@@ -4416,7 +4416,7 @@ void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes)
#endif
#endif
}
}
void ma_zero_memory_64(void* dst, ma_uint64 sizeInBytes)
static MA_INLINE
void ma_zero_memory_64(void* dst, ma_uint64 sizeInBytes)
{
{
#if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX
#if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX
MA_ZERO_MEMORY(dst, (size_t)sizeInBytes);
MA_ZERO_MEMORY(dst, (size_t)sizeInBytes);
...
@@ -4577,12 +4577,12 @@ for miniaudio's purposes.
...
@@ -4577,12 +4577,12 @@ for miniaudio's purposes.
#define MA_LCG_C 0
#define MA_LCG_C 0
static ma_int32 g_maLCG = 4321; /* Non-zero initial seed. Use ma_seed() to use an explicit seed. */
static ma_int32 g_maLCG = 4321; /* Non-zero initial seed. Use ma_seed() to use an explicit seed. */
void ma_seed(ma_int32 seed)
static MA_INLINE
void ma_seed(ma_int32 seed)
{
{
g_maLCG = seed;
g_maLCG = seed;
}
}
ma_int32 ma_rand_s32()
static MA_INLINE
ma_int32 ma_rand_s32()
{
{
ma_int32 lcg = g_maLCG;
ma_int32 lcg = g_maLCG;
ma_int32 r = (MA_LCG_A * lcg + MA_LCG_C) % MA_LCG_M;
ma_int32 r = (MA_LCG_A * lcg + MA_LCG_C) % MA_LCG_M;
...
@@ -4590,27 +4590,27 @@ ma_int32 ma_rand_s32()
...
@@ -4590,27 +4590,27 @@ ma_int32 ma_rand_s32()
return r;
return r;
}
}
ma_uint32 ma_rand_u32()
static MA_INLINE
ma_uint32 ma_rand_u32()
{
{
return (ma_uint32)ma_rand_s32();
return (ma_uint32)ma_rand_s32();
}
}
double ma_rand_f64()
static MA_INLINE
double ma_rand_f64()
{
{
return ma_rand_s32() / (double)0x7FFFFFFF;
return ma_rand_s32() / (double)0x7FFFFFFF;
}
}
float ma_rand_f32()
static MA_INLINE
float ma_rand_f32()
{
{
return (float)ma_rand_f64();
return (float)ma_rand_f64();
}
}
float ma_rand_range_f32(float lo, float hi)
static MA_INLINE
float ma_rand_range_f32(float lo, float hi)
{
{
return ma_scale_to_range_f32(ma_rand_f32(), lo, hi);
return ma_scale_to_range_f32(ma_rand_f32(), lo, hi);
}
}
ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi)
static MA_INLINE
ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi)
{
{
if (lo == hi) {
if (lo == hi) {
return lo;
return lo;
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