Changeset e98a8c4 in mainline for uspace/lib/drv/generic/remote_audio_pcm.c
- Timestamp:
- 2012-08-30T12:58:25Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 37367f7
- Parents:
- 5337491
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_audio_pcm.c
r5337491 re98a8c4 57 57 IPC_M_AUDIO_PCM_STOP_CAPTURE, 58 58 } audio_pcm_iface_funcs_t; 59 60 const char *audio_pcm_cap_str(audio_cap_t cap) 61 { 62 static const char *caps[] = { 63 [AUDIO_CAP_CAPTURE] = "CAPTURE", 64 [AUDIO_CAP_PLAYBACK] = "PLAYBACK", 65 [AUDIO_CAP_MAX_BUFFER] = "MAXIMUM BUFFER SIZE", 66 [AUDIO_CAP_BUFFER_POS] = "KNOWS BUFFER POSITION", 67 [AUDIO_CAP_INTERRUPT] = "FRAGMENT INTERRUPTS", 68 [AUDIO_CAP_INTERRUPT_MIN_FRAMES] = "MINIMUM FRAGMENT SIZE", 69 [AUDIO_CAP_INTERRUPT_MAX_FRAMES] = "MAXIMUM FRAGMENT SIZE", 70 }; 71 if (cap > (sizeof(caps) / sizeof(*caps))) 72 return "UNKNOWN CAP"; 73 return caps[cap]; 74 75 } 76 77 const char *audio_pcm_event_str(pcm_event_t event) 78 { 79 static const char *events[] = { 80 [PCM_EVENT_PLAYBACK_STARTED] = "PLAYBACK STARTED", 81 [PCM_EVENT_CAPTURE_STARTED] = "CAPTURE STARTED", 82 [PCM_EVENT_FRAMES_PLAYED] = "FRAGMENT PLAYED", 83 [PCM_EVENT_FRAMES_CAPTURED] = "FRAGMENT CAPTURED", 84 [PCM_EVENT_PLAYBACK_TERMINATED] = "PLAYBACK TERMINATED", 85 [PCM_EVENT_CAPTURE_TERMINATED] = "CAPTURE TERMINATED", 86 }; 87 if (event > (sizeof(events) / sizeof(*events))) 88 return "UNKNOWN EVENT"; 89 return events[event]; 90 } 59 91 60 92 /*
Note:
See TracChangeset
for help on using the changeset viewer.