| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Due to clumsy layout, the audio_format struct took 12 bytes. Move the
"channels" to the end, so it can be merged into the same 32 bit slot
as "bits", which reduces the struct size to 8 bytes.
|
|
|
|
|
| |
Get rid of CamelCase, and don't use a typedef, so we can
forward-declare it, and unclutter the include dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
volatile provides absolutely no guarantee thread-safety in SMP
environments. volatile was designed to access memory locations
in peripheral hardware directly; not for SMP. If volatile is
needed to work properly on SMP, then it is only hiding subtle
bugs.
volatile only prevents the /compiler/ from making optimizations
when accessing variables. CPUs do their own optimizations at
runtime so it cannot guarantee registers of CPUs are flushed
to memory cache-coherent access on different CPUs.
Furthermore, the thread-communication via condition variables
between threads sharing audio formats already results in memory
barriers.
|
|
|
|
|
| |
Make the code more readable by hiding big formulas in an inline
function with a nice name.
|
|
We want to expose the AudioFormat structure to plugins; remove some
clutter by moving its declaration to a separate header file.
|