mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Tweak some PCM drivers for less typecasting with the data pointer.
Yeah, sizeof (void) here with GCC is 1. If something has a problem with that, we'll set it straight. Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
This commit is contained in:
parent
f6e17e86fe
commit
cd8e11b463
6 changed files with 22 additions and 24 deletions
|
|
@ -90,7 +90,7 @@ GstBus *gst_bus = NULL;
|
|||
static int bus_watch_id = 0;
|
||||
GMainLoop *pcm_loop = NULL;
|
||||
|
||||
static __u8* pcm_data = NULL;
|
||||
static const void* pcm_data = NULL;
|
||||
static size_t pcm_data_size = 0;
|
||||
|
||||
static int audio_locked = 0;
|
||||
|
|
@ -128,7 +128,7 @@ void pcm_dma_apply_settings(void)
|
|||
|
||||
void pcm_play_dma_start(const void *addr, size_t size)
|
||||
{
|
||||
pcm_data = (__u8 *) addr;
|
||||
pcm_data = addr;
|
||||
pcm_data_size = size;
|
||||
|
||||
if (playback_granted)
|
||||
|
|
@ -189,13 +189,12 @@ static void feed_data(GstElement * appsrc, guint size_hint, void *unused)
|
|||
from inside gstreamer's stream thread as it will deadlock */
|
||||
inside_feed_data = 1;
|
||||
|
||||
if (pcm_play_dma_complete_callback(PCM_DMAST_OK, (const void **)&pcm_data,
|
||||
&pcm_data_size))
|
||||
if (pcm_play_dma_complete_callback(PCM_DMAST_OK, &pcm_data, &pcm_data_size))
|
||||
{
|
||||
GstBuffer *buffer = gst_buffer_new ();
|
||||
GstFlowReturn ret;
|
||||
|
||||
GST_BUFFER_DATA (buffer) = pcm_data;
|
||||
GST_BUFFER_DATA (buffer) = (__u8 *)pcm_data;
|
||||
GST_BUFFER_SIZE (buffer) = pcm_data_size;
|
||||
|
||||
g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue