aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_format.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* audio: moved cmpAudioFormat() to audio_format.hMax Kellermann2008-09-091-0/+8
| | | | | Rename it to audio_format_equals() and return "true" if they are equal.
* pack the struct audio_formatMax Kellermann2008-09-071-1/+1
| | | | | | 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.
* audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann2008-09-071-4/+4
| | | | | Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
* audio_format: volatile removalEric Wong2008-09-071-3/+3
| | | | | | | | | | | | | | | | | 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.
* added inline function audio_format_time_to_size()Max Kellermann2008-08-261-0/+5
| | | | | Make the code more readable by hiding big formulas in an inline function with a nice name.
* moved struct AudioFormat to audio_format.hMax Kellermann2008-08-261-0/+35
We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.