src/emu/disound.c
| r12551 | r12552 | |
| 81 | 81 | // append a new route to the list |
| 82 | 82 | astring devtag; |
| 83 | 83 | device.siblingtag(devtag, target); |
| 84 | | sound->m_route_list.append(*global_alloc(sound_route(output, input, gain, core_strdup(devtag.cstr())))); |
| 84 | sound->m_route_list.append(*global_alloc(sound_route(output, input, gain, devtag.cstr()))); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
| r12551 | r12552 | |
| 232 | 232 | const device_t *target = device().mconfig().devicelist().find(route->m_target); |
| 233 | 233 | if (target == NULL) |
| 234 | 234 | { |
| 235 | | mame_printf_error("%s: %s attempting to route sound to non-existant device '%s'\n", driver.source_file, driver.name, route->m_target); |
| 235 | mame_printf_error("%s: %s attempting to route sound to non-existant device '%s'\n", driver.source_file, driver.name, route->m_target.cstr()); |
| 236 | 236 | error = true; |
| 237 | 237 | } |
| 238 | 238 | |
| r12551 | r12552 | |
| 240 | 240 | const device_sound_interface *sound; |
| 241 | 241 | if (target != NULL && target->type() != SPEAKER && !target->interface(sound)) |
| 242 | 242 | { |
| 243 | | mame_printf_error("%s: %s attempting to route sound to a non-sound device '%s' (%s)\n", driver.source_file, driver.name, route->m_target, target->name()); |
| 243 | mame_printf_error("%s: %s attempting to route sound to a non-sound device '%s' (%s)\n", driver.source_file, driver.name, route->m_target.cstr(), target->name()); |
| 244 | 244 | error = true; |
| 245 | 245 | } |
| 246 | 246 | } |
| r12551 | r12552 | |
| 316 | 316 | int streamoutputnum; |
| 317 | 317 | sound_stream *outputstream = sound->output_to_stream_output(outputnum, streamoutputnum); |
| 318 | 318 | if (outputstream == NULL) |
| 319 | | fatalerror("Sound device '%s' specifies route for non-existant output #%d", route->m_target, outputnum); |
| 319 | fatalerror("Sound device '%s' specifies route for non-existant output #%d", route->m_target.cstr(), outputnum); |
| 320 | 320 | |
| 321 | 321 | // find the input stream to connect to |
| 322 | 322 | int streaminputnum; |
| 323 | 323 | sound_stream *inputstream = input_to_stream_input(inputnum++, streaminputnum); |
| 324 | 324 | if (inputstream == NULL) |
| 325 | | fatalerror("Sound device '%s' targeted output #%d to non-existant device '%s' input %d", route->m_target, outputnum, m_device.tag(), inputnum - 1); |
| 325 | fatalerror("Sound device '%s' targeted output #%d to non-existant device '%s' input %d", route->m_target.cstr(), outputnum, m_device.tag(), inputnum - 1); |
| 326 | 326 | |
| 327 | 327 | // set the input |
| 328 | 328 | inputstream->set_input(streaminputnum, outputstream, streamoutputnum, route->m_gain); |