mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-06 01:40:09 -05:00
Corrected and completed encapsulation for PCM and rawmidi. Remove SND_PCM_HW_PARAM_* and use functions. Separated rawmidi info between streams
This commit is contained in:
parent
544718f10d
commit
a7561a9c7e
40 changed files with 2733 additions and 1537 deletions
|
|
@ -227,7 +227,7 @@ int snd_pcm_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t *info)
|
|||
int snd_pcm_channel_info_shm(snd_pcm_t *pcm, snd_pcm_channel_info_t *info,
|
||||
int shmid)
|
||||
{
|
||||
switch (pcm->access) {
|
||||
switch (snd_enum_to_int(pcm->access)) {
|
||||
case SND_PCM_ACCESS_MMAP_INTERLEAVED:
|
||||
case SND_PCM_ACCESS_RW_INTERLEAVED:
|
||||
info->first = info->channel * pcm->sample_bits;
|
||||
|
|
@ -432,7 +432,7 @@ snd_pcm_sframes_t snd_pcm_write_mmap(snd_pcm_t *pcm, snd_pcm_uframes_t size)
|
|||
snd_pcm_uframes_t cont = pcm->buffer_size - offset;
|
||||
if (cont < frames)
|
||||
frames = cont;
|
||||
switch (pcm->access) {
|
||||
switch (snd_enum_to_int(pcm->access)) {
|
||||
case SND_PCM_ACCESS_MMAP_INTERLEAVED:
|
||||
{
|
||||
const snd_pcm_channel_area_t *a = snd_pcm_mmap_areas(pcm);
|
||||
|
|
@ -478,7 +478,7 @@ snd_pcm_sframes_t snd_pcm_read_mmap(snd_pcm_t *pcm, snd_pcm_uframes_t size)
|
|||
snd_pcm_uframes_t cont = pcm->buffer_size - offset;
|
||||
if (cont < frames)
|
||||
frames = cont;
|
||||
switch (pcm->access) {
|
||||
switch (snd_enum_to_int(pcm->access)) {
|
||||
case SND_PCM_ACCESS_MMAP_INTERLEAVED:
|
||||
{
|
||||
const snd_pcm_channel_area_t *a = snd_pcm_mmap_areas(pcm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue