@@ -31,15 +31,15 @@ namespace osd {
3131
3232namespace {
3333
34- class sound_sdl : public osd_module , public sound_module
34+ class sound_sdl3 : public osd_module , public sound_module
3535{
3636public:
37- sound_sdl () :
37+ sound_sdl3 () :
3838 osd_module (OSD_SOUND_PROVIDER , " sdl" ), sound_module()
3939 {
4040 }
4141
42- virtual ~sound_sdl () { }
42+ virtual ~sound_sdl3 () { }
4343
4444 virtual int init (osd_interface &osd, const osd_options &options) override ;
4545 virtual void exit () override ;
@@ -93,10 +93,10 @@ class sound_sdl : public osd_module, public sound_module
9393};
9494
9595// ============================================================
96- // sound_sdl ::init
96+ // sound_sdl3 ::init
9797// ============================================================
9898
99- int sound_sdl ::init (osd_interface &osd, const osd_options &options)
99+ int sound_sdl3 ::init (osd_interface &osd, const osd_options &options)
100100{
101101 m_stream_next_id = 1 ;
102102
@@ -180,18 +180,18 @@ int sound_sdl::init(osd_interface &osd, const osd_options &options)
180180 return 0 ;
181181}
182182
183- void sound_sdl ::exit ()
183+ void sound_sdl3 ::exit ()
184184{
185185 SDL_QuitSubSystem (SDL_INIT_AUDIO );
186186 m_devices.clear ();
187187}
188188
189- uint32_t sound_sdl ::get_generation ()
189+ uint32_t sound_sdl3 ::get_generation ()
190190{
191191 return 1 ;
192192}
193193
194- osd::audio_info sound_sdl ::get_information ()
194+ osd::audio_info sound_sdl3 ::get_information ()
195195{
196196 enum { FL , FR , FC , LFE , BL , BR , BC , SL , SR , AUX };
197197 static const char *const posname[10 ] = { " FL" , " FR" , " FC" , " LFE" , " BL" , " BR" , " BC" , " SL" , " SR" , " AUX" };
@@ -247,7 +247,7 @@ osd::audio_info sound_sdl::get_information()
247247 return m_deviceinfo;
248248}
249249
250- uint32_t sound_sdl ::stream_sink_open (uint32_t node, std::string name, uint32_t rate)
250+ uint32_t sound_sdl3 ::stream_sink_open (uint32_t node, std::string name, uint32_t rate)
251251{
252252 const int devnode = node - 1 ;
253253 const SDL_AudioDeviceID device_id = m_devices[devnode].m_device_id ;
@@ -285,7 +285,7 @@ uint32_t sound_sdl::stream_sink_open(uint32_t node, std::string name, uint32_t r
285285 return id;
286286}
287287
288- uint32_t sound_sdl ::stream_source_open (uint32_t node, std::string name, uint32_t rate)
288+ uint32_t sound_sdl3 ::stream_source_open (uint32_t node, std::string name, uint32_t rate)
289289{
290290 const int devnode = node - 1 ;
291291 const SDL_AudioDeviceID device_id = m_devices[devnode].m_device_id ;
@@ -328,7 +328,7 @@ uint32_t sound_sdl::stream_source_open(uint32_t node, std::string name, uint32_t
328328 return id;
329329}
330330
331- void sound_sdl ::stream_close (uint32_t id)
331+ void sound_sdl3 ::stream_close (uint32_t id)
332332{
333333 osd_printf_verbose (" SDL Audio: Closing stream id %d\n " , id);
334334
@@ -341,7 +341,7 @@ void sound_sdl::stream_close(uint32_t id)
341341 m_streams.erase (si);
342342}
343343
344- void sound_sdl ::stream_sink_update (uint32_t id, const int16_t *buffer, int samples_this_frame)
344+ void sound_sdl3 ::stream_sink_update (uint32_t id, const int16_t *buffer, int samples_this_frame)
345345{
346346 auto si = m_streams.find (id);
347347 if (si == m_streams.end ())
@@ -350,7 +350,7 @@ void sound_sdl::stream_sink_update(uint32_t id, const int16_t *buffer, int sampl
350350 SDL_PutAudioStreamData (stream->m_sdl_stream , (void *)buffer, samples_this_frame * sizeof (int16_t ) * stream->m_buffer .channels ());
351351}
352352
353- void sound_sdl ::stream_source_update (uint32_t id, int16_t *buffer, int samples_this_frame)
353+ void sound_sdl3 ::stream_source_update (uint32_t id, int16_t *buffer, int samples_this_frame)
354354{
355355 auto si = m_streams.find (id);
356356 if (si == m_streams.end ())
@@ -365,9 +365,9 @@ void sound_sdl::stream_source_update(uint32_t id, int16_t *buffer, int samples_t
365365
366366#else // (defined(OSD_SDL) || defined(USE_SDL_SOUND)) && defined(SDLMAME_SDL3)
367367
368- namespace osd { namespace { MODULE_NOT_SUPPORTED (sound_sdl , OSD_SOUND_PROVIDER , " sdl" ) } }
368+ namespace osd { namespace { MODULE_NOT_SUPPORTED (sound_sdl3 , OSD_SOUND_PROVIDER , " sdl" ) } }
369369
370370#endif
371371
372- MODULE_DEFINITION (SOUND_SDL , osd::sound_sdl )
372+ MODULE_DEFINITION (SOUND_SDL3 , osd::sound_sdl3 )
373373
0 commit comments