mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 962346 - Pass STACK_SIZE_PARAM_IS_A_RESERVATION to _beginthreadex in Windows cubeb backends to save address space. r=padenot
This commit is contained in:
parent
af4bb14ac6
commit
545b765abe
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
||||
|
||||
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
|
||||
|
||||
The git commit ID used was a137c78c4ba1a6b0ebde5548664bdf6390ef5437.
|
||||
The git commit ID used was e8df12d770c6299640540e91cec13dc81efc9bbe.
|
||||
|
@ -71,7 +71,6 @@ extern "C" {
|
||||
@endcode
|
||||
*/
|
||||
|
||||
|
||||
/** @file
|
||||
The <tt>libcubeb</tt> C API. */
|
||||
|
||||
|
@ -58,7 +58,7 @@ int audiotrack_init(cubeb ** context, char const * context_name);
|
||||
int
|
||||
validate_stream_params(cubeb_stream_params stream_params)
|
||||
{
|
||||
if (stream_params.rate < 1 || stream_params.rate > 192000 ||
|
||||
if (stream_params.rate < 1000 || stream_params.rate > 192000 ||
|
||||
stream_params.channels < 1 || stream_params.channels > 8) {
|
||||
return CUBEB_ERROR_INVALID_FORMAT;
|
||||
}
|
||||
|
@ -570,7 +570,6 @@ init_local_config_with_workaround(char const * pcm_name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
alsa_locked_pcm_open(snd_pcm_t ** pcm, snd_pcm_stream_t stream, snd_config_t * local_config)
|
||||
{
|
||||
@ -981,7 +980,6 @@ alsa_get_min_latency(cubeb * ctx, cubeb_stream_params params, uint32_t * latency
|
||||
return CUBEB_OK;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
alsa_stream_start(cubeb_stream * stm)
|
||||
{
|
||||
|
@ -188,7 +188,6 @@ audiounit_get_acceptable_latency_range(AudioValueRange * latency_range)
|
||||
return CUBEB_OK;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
audiounit_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
|
||||
{
|
||||
@ -273,7 +272,6 @@ audiounit_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate)
|
||||
return CUBEB_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
audiounit_destroy(cubeb * ctx)
|
||||
{
|
||||
@ -304,7 +302,6 @@ audiounit_stream_init(cubeb * context, cubeb_stream ** stream, char const * stre
|
||||
AudioDeviceID output_device_id;
|
||||
AudioValueRange latency_range;
|
||||
|
||||
|
||||
assert(context);
|
||||
*stream = NULL;
|
||||
|
||||
|
@ -167,7 +167,6 @@ opensl_init(cubeb ** context, char const * context_name)
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
|
||||
|
||||
const SLEngineOption opt[] = {{SL_ENGINEOPTION_THREADSAFE, SL_BOOLEAN_TRUE}};
|
||||
|
||||
SLresult res;
|
||||
|
@ -153,7 +153,6 @@ sndio_get_backend_id(cubeb *context)
|
||||
return "sndio";
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
sndio_destroy(cubeb *context)
|
||||
{
|
||||
|
@ -95,7 +95,6 @@ struct cubeb
|
||||
revert_mm_thread_characteristics_function revert_mm_thread_characteristics;
|
||||
};
|
||||
|
||||
|
||||
struct cubeb_stream
|
||||
{
|
||||
cubeb * context;
|
||||
@ -732,7 +731,6 @@ wasapi_stream_init(cubeb * context, cubeb_stream ** stream,
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
|
||||
|
||||
if (!stm->refill_event) {
|
||||
SafeRelease(stm->shutdown_event);
|
||||
LOG("Can't create the refill event, error: %d.", GetLastError());
|
||||
@ -780,7 +778,6 @@ wasapi_stream_init(cubeb * context, cubeb_stream ** stream,
|
||||
float resampling_rate = static_cast<float>(stm->stream_params.rate) /
|
||||
stm->mix_params.rate;
|
||||
|
||||
|
||||
if (resampling_rate != 1.0) {
|
||||
/* If we are playing a mono stream, we only resample one channel,
|
||||
* and copy it over, so we are always resampling the number
|
||||
@ -913,7 +910,7 @@ int wasapi_stream_start(cubeb_stream * stm)
|
||||
|
||||
assert(stm);
|
||||
|
||||
stm->thread = (HANDLE) _beginthreadex(NULL, 64 * 1024, wasapi_stream_render_loop, stm, 0, NULL);
|
||||
stm->thread = (HANDLE) _beginthreadex(NULL, 64 * 1024, wasapi_stream_render_loop, stm, STACK_SIZE_PARAM_IS_A_RESERVATION, NULL);
|
||||
if (stm->thread == NULL) {
|
||||
LOG("could not create WASAPI render thread.");
|
||||
return CUBEB_ERROR;
|
||||
|
@ -265,7 +265,7 @@ winmm_init(cubeb ** context, char const * context_name)
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
|
||||
ctx->thread = (HANDLE) _beginthreadex(NULL, 64 * 1024, winmm_buffer_thread, ctx, 0, NULL);
|
||||
ctx->thread = (HANDLE) _beginthreadex(NULL, 64 * 1024, winmm_buffer_thread, ctx, STACK_SIZE_PARAM_IS_A_RESERVATION, NULL);
|
||||
if (!ctx->thread) {
|
||||
winmm_destroy(ctx);
|
||||
return CUBEB_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user