alsa: No need to go via sink/source to get the core.
authorColin Guthrie <colin@mageia.org>
Thu, 7 Jul 2011 09:37:25 +0000 (10:37 +0100)
committerColin Guthrie <colin@mageia.org>
Wed, 20 Jul 2011 21:23:11 +0000 (22:23 +0100)
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c

index bb1220a..c1655d4 100644 (file)
@@ -589,8 +589,8 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle
             }
 
             /* Make sure that if these memblocks need to be copied they will fit into one slot */
-            if (frames > pa_mempool_block_size_max(u->sink->core->mempool)/u->frame_size)
-                frames = pa_mempool_block_size_max(u->sink->core->mempool)/u->frame_size;
+            if (frames > pa_mempool_block_size_max(u->core->mempool)/u->frame_size)
+                frames = pa_mempool_block_size_max(u->core->mempool)/u->frame_size;
 
             if (!after_avail && frames == 0)
                 break;
index ec63e69..6b6f513 100644 (file)
@@ -557,8 +557,8 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
             }
 
             /* Make sure that if these memblocks need to be copied they will fit into one slot */
-            if (frames > pa_mempool_block_size_max(u->source->core->mempool)/u->frame_size)
-                frames = pa_mempool_block_size_max(u->source->core->mempool)/u->frame_size;
+            if (frames > pa_mempool_block_size_max(u->core->mempool)/u->frame_size)
+                frames = pa_mempool_block_size_max(u->core->mempool)/u->frame_size;
 
             if (!after_avail && frames == 0)
                 break;