winepulse: Include mult.c in pulse.c.

Originally meant to address the fact that mult_alaw_sample() and
mult_ulaw_sample() were exported without being hidden, but this file is only
used from pulse.c, and is relatively quite simple, so just make them static
and use the preprocessor instead of linking.
This commit is contained in:
Zebediah Figura 2023-01-29 15:08:27 -06:00 committed by Alexandre Julliard
parent e5eeca3843
commit b8e912f795
3 changed files with 4 additions and 11 deletions

View file

@ -6,5 +6,4 @@ UNIX_CFLAGS = $(PULSE_CFLAGS)
C_SRCS = \
mmdevdrv.c \
mult.c \
pulse.c

View file

@ -20,11 +20,6 @@
#include <windef.h>
#if 0
#pragma makedep unix
#endif
/**********************************************************************
* A-law and u-law sample manipulation functions
* Multiply with the given volume (vol must be between 0...1 inclusive)
@ -32,7 +27,7 @@
* These were taken from PulseAudio's sources but adjusted to directly
* fit our usage (since we use floats directly) so they should be exact.
*/
UINT8 mult_alaw_sample(UINT8 sample, float vol)
static UINT8 mult_alaw_sample(UINT8 sample, float vol)
{
static const float decode_to_13bits_float[1 << 8] =
{
@ -708,7 +703,7 @@ UINT8 mult_alaw_sample(UINT8 sample, float vol)
return encode[(int)(vol * decode_to_13bits_float[sample]) + ARRAY_SIZE(encode) / 2];
}
UINT8 mult_ulaw_sample(UINT8 sample, float vol)
static UINT8 mult_ulaw_sample(UINT8 sample, float vol)
{
static const float decode_to_14bits_float[1 << 8] =
{

View file

@ -44,6 +44,8 @@
#include "../mmdevapi/unixlib.h"
#include "mult.h"
WINE_DEFAULT_DEBUG_CHANNEL(pulse);
enum phys_device_bus_type {
@ -117,9 +119,6 @@ static const REFERENCE_TIME DefaultPeriod = 100000;
static pthread_mutex_t pulse_mutex;
static pthread_cond_t pulse_cond = PTHREAD_COND_INITIALIZER;
UINT8 mult_alaw_sample(UINT8, float);
UINT8 mult_ulaw_sample(UINT8, float);
static void pulse_lock(void)
{
pthread_mutex_lock(&pulse_mutex);