mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00
- OSD_PROFILING is now an environment variable. No more recompiling to turn profiling on
- Added two asserts to task processing
This commit is contained in:
parent
e60cd95d44
commit
a4054be2b3
@ -89,7 +89,7 @@ static DEVICE_RESET( discrete );
|
||||
static STREAM_UPDATE( discrete_stream_update );
|
||||
static STREAM_UPDATE( buffer_stream_update );
|
||||
|
||||
static int profiling = DISCRETE_PROFILING;
|
||||
static int profiling = 0;
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -499,6 +499,10 @@ static DEVICE_START( discrete )
|
||||
if (DISCRETE_DEBUGLOG)
|
||||
info->disclogfile = fopen(name, "w");
|
||||
|
||||
/* enable profiling */
|
||||
if (getenv("DISCRETE_PROFILING"))
|
||||
profiling = atoi(getenv("DISCRETE_PROFILING"));
|
||||
|
||||
/* Build the final block list */
|
||||
info->block_list = NULL;
|
||||
intf = &info->block_list;
|
||||
@ -692,11 +696,13 @@ static void *task_callback(void *param, int threadid)
|
||||
int avail;
|
||||
|
||||
avail = sn->task->ptr[sn->output_node] - sn->ptr;
|
||||
assert_always(avail >= 0, "task_callback: available samples are negative");
|
||||
if (avail < samples)
|
||||
samples = avail;
|
||||
}
|
||||
|
||||
task->samples -= samples;
|
||||
assert_always(task->samples >=0, "task_callback: task_samples got negative");
|
||||
while (samples > 0)
|
||||
{
|
||||
/* step */
|
||||
|
Loading…
Reference in New Issue
Block a user