Revision 98f9f48c
b/audio/alsaaudio.c | ||
---|---|---|
786 | 786 |
int add; |
787 | 787 |
int len; |
788 | 788 |
} bufs[2] = { |
789 |
{.add = hw->wpos, |
|
790 |
.len = 0}, |
|
791 |
{.add = 0, |
|
792 |
.len = 0} |
|
789 |
{ .add = hw->wpos, .len = 0 }, |
|
790 |
{ .add = 0, .len = 0 } |
|
793 | 791 |
}; |
794 | 792 |
snd_pcm_sframes_t avail; |
795 | 793 |
snd_pcm_uframes_t read_samples = 0; |
... | ... | |
937 | 935 |
} |
938 | 936 |
|
939 | 937 |
static struct audio_option alsa_options[] = { |
940 |
{.name = "DAC_SIZE_IN_USEC", |
|
941 |
.tag = AUD_OPT_BOOL, |
|
942 |
.valp = &conf.size_in_usec_out, |
|
943 |
.descr = "DAC period/buffer size in microseconds (otherwise in frames)"}, |
|
944 |
{.name = "DAC_PERIOD_SIZE", |
|
945 |
.tag = AUD_OPT_INT, |
|
946 |
.valp = &conf.period_size_out, |
|
947 |
.descr = "DAC period size (0 to go with system default)", |
|
948 |
.overriddenp = &conf.period_size_out_overridden}, |
|
949 |
{.name = "DAC_BUFFER_SIZE", |
|
950 |
.tag = AUD_OPT_INT, |
|
951 |
.valp = &conf.buffer_size_out, |
|
952 |
.descr = "DAC buffer size (0 to go with system default)", |
|
953 |
.overriddenp = &conf.buffer_size_out_overridden}, |
|
954 |
{.name = "ADC_SIZE_IN_USEC", |
|
955 |
.tag = AUD_OPT_BOOL, |
|
956 |
.valp = &conf.size_in_usec_in, |
|
957 |
.descr = "ADC period/buffer size in microseconds (otherwise in frames)"}, |
|
958 |
{.name = "ADC_PERIOD_SIZE", |
|
959 |
.tag = AUD_OPT_INT, |
|
960 |
.valp = &conf.period_size_in, |
|
961 |
.descr = "ADC period size (0 to go with system default)", |
|
962 |
.overriddenp = &conf.period_size_in_overridden}, |
|
963 |
{.name = "ADC_BUFFER_SIZE", |
|
964 |
.tag = AUD_OPT_INT, |
|
965 |
.valp = &conf.buffer_size_in, |
|
966 |
.descr = "ADC buffer size (0 to go with system default)", |
|
967 |
.overriddenp = &conf.buffer_size_in_overridden}, |
|
968 |
{.name = "THRESHOLD", |
|
969 |
.tag = AUD_OPT_INT, |
|
970 |
.valp = &conf.threshold, |
|
971 |
.descr = "(undocumented)"}, |
|
972 |
{.name = "DAC_DEV", |
|
973 |
.tag = AUD_OPT_STR, |
|
974 |
.valp = &conf.pcm_name_out, |
|
975 |
.descr = "DAC device name (for instance dmix)"}, |
|
976 |
{.name = "ADC_DEV", |
|
977 |
.tag = AUD_OPT_STR, |
|
978 |
.valp = &conf.pcm_name_in, |
|
979 |
.descr = "ADC device name"}, |
|
980 |
{.name = "VERBOSE", |
|
981 |
.tag = AUD_OPT_BOOL, |
|
982 |
.valp = &conf.verbose, |
|
983 |
.descr = "Behave in a more verbose way"}, |
|
938 |
{ |
|
939 |
.name = "DAC_SIZE_IN_USEC", |
|
940 |
.tag = AUD_OPT_BOOL, |
|
941 |
.valp = &conf.size_in_usec_out, |
|
942 |
.descr = "DAC period/buffer size in microseconds (otherwise in frames)" |
|
943 |
}, |
|
944 |
{ |
|
945 |
.name = "DAC_PERIOD_SIZE", |
|
946 |
.tag = AUD_OPT_INT, |
|
947 |
.valp = &conf.period_size_out, |
|
948 |
.descr = "DAC period size (0 to go with system default)", |
|
949 |
.overriddenp = &conf.period_size_out_overridden |
|
950 |
}, |
|
951 |
{ |
|
952 |
.name = "DAC_BUFFER_SIZE", |
|
953 |
.tag = AUD_OPT_INT, |
|
954 |
.valp = &conf.buffer_size_out, |
|
955 |
.descr = "DAC buffer size (0 to go with system default)", |
|
956 |
.overriddenp = &conf.buffer_size_out_overridden |
|
957 |
}, |
|
958 |
{ |
|
959 |
.name = "ADC_SIZE_IN_USEC", |
|
960 |
.tag = AUD_OPT_BOOL, |
|
961 |
.valp = &conf.size_in_usec_in, |
|
962 |
.descr = |
|
963 |
"ADC period/buffer size in microseconds (otherwise in frames)" |
|
964 |
}, |
|
965 |
{ |
|
966 |
.name = "ADC_PERIOD_SIZE", |
|
967 |
.tag = AUD_OPT_INT, |
|
968 |
.valp = &conf.period_size_in, |
|
969 |
.descr = "ADC period size (0 to go with system default)", |
|
970 |
.overriddenp = &conf.period_size_in_overridden |
|
971 |
}, |
|
972 |
{ |
|
973 |
.name = "ADC_BUFFER_SIZE", |
|
974 |
.tag = AUD_OPT_INT, |
|
975 |
.valp = &conf.buffer_size_in, |
|
976 |
.descr = "ADC buffer size (0 to go with system default)", |
|
977 |
.overriddenp = &conf.buffer_size_in_overridden |
|
978 |
}, |
|
979 |
{ |
|
980 |
.name = "THRESHOLD", |
|
981 |
.tag = AUD_OPT_INT, |
|
982 |
.valp = &conf.threshold, |
|
983 |
.descr = "(undocumented)" |
|
984 |
}, |
|
985 |
{ |
|
986 |
.name = "DAC_DEV", |
|
987 |
.tag = AUD_OPT_STR, |
|
988 |
.valp = &conf.pcm_name_out, |
|
989 |
.descr = "DAC device name (for instance dmix)" |
|
990 |
}, |
|
991 |
{ |
|
992 |
.name = "ADC_DEV", |
|
993 |
.tag = AUD_OPT_STR, |
|
994 |
.valp = &conf.pcm_name_in, |
|
995 |
.descr = "ADC device name" |
|
996 |
}, |
|
997 |
{ |
|
998 |
.name = "VERBOSE", |
|
999 |
.tag = AUD_OPT_BOOL, |
|
1000 |
.valp = &conf.verbose, |
|
1001 |
.descr = "Behave in a more verbose way" |
|
1002 |
}, |
|
984 | 1003 |
{ /* End of list */ } |
985 | 1004 |
}; |
986 | 1005 |
|
b/audio/audio.c | ||
---|---|---|
1493 | 1493 |
|
1494 | 1494 |
static struct audio_option audio_options[] = { |
1495 | 1495 |
/* DAC */ |
1496 |
{.name = "DAC_FIXED_SETTINGS", |
|
1497 |
.tag = AUD_OPT_BOOL, |
|
1498 |
.valp = &conf.fixed_out.enabled, |
|
1499 |
.descr = "Use fixed settings for host DAC"}, |
|
1500 |
{.name = "DAC_FIXED_FREQ", |
|
1501 |
.tag = AUD_OPT_INT, |
|
1502 |
.valp = &conf.fixed_out.settings.freq, |
|
1503 |
.descr = "Frequency for fixed host DAC"}, |
|
1504 |
{.name = "DAC_FIXED_FMT", |
|
1505 |
.tag = AUD_OPT_FMT, |
|
1506 |
.valp = &conf.fixed_out.settings.fmt, |
|
1507 |
.descr = "Format for fixed host DAC"}, |
|
1508 |
{.name = "DAC_FIXED_CHANNELS", |
|
1509 |
.tag = AUD_OPT_INT, |
|
1510 |
.valp = &conf.fixed_out.settings.nchannels, |
|
1511 |
.descr = "Number of channels for fixed DAC (1 - mono, 2 - stereo)"}, |
|
1512 |
{.name = "DAC_VOICES", |
|
1513 |
.tag = AUD_OPT_INT, |
|
1514 |
.valp = &conf.fixed_out.nb_voices, |
|
1515 |
.descr = "Number of voices for DAC"}, |
|
1496 |
{ |
|
1497 |
.name = "DAC_FIXED_SETTINGS", |
|
1498 |
.tag = AUD_OPT_BOOL, |
|
1499 |
.valp = &conf.fixed_out.enabled, |
|
1500 |
.descr = "Use fixed settings for host DAC" |
|
1501 |
}, |
|
1502 |
{ |
|
1503 |
.name = "DAC_FIXED_FREQ", |
|
1504 |
.tag = AUD_OPT_INT, |
|
1505 |
.valp = &conf.fixed_out.settings.freq, |
|
1506 |
.descr = "Frequency for fixed host DAC" |
|
1507 |
}, |
|
1508 |
{ |
|
1509 |
.name = "DAC_FIXED_FMT", |
|
1510 |
.tag = AUD_OPT_FMT, |
|
1511 |
.valp = &conf.fixed_out.settings.fmt, |
|
1512 |
.descr = "Format for fixed host DAC" |
|
1513 |
}, |
|
1514 |
{ |
|
1515 |
.name = "DAC_FIXED_CHANNELS", |
|
1516 |
.tag = AUD_OPT_INT, |
|
1517 |
.valp = &conf.fixed_out.settings.nchannels, |
|
1518 |
.descr = "Number of channels for fixed DAC (1 - mono, 2 - stereo)" |
|
1519 |
}, |
|
1520 |
{ |
|
1521 |
.name = "DAC_VOICES", |
|
1522 |
.tag = AUD_OPT_INT, |
|
1523 |
.valp = &conf.fixed_out.nb_voices, |
|
1524 |
.descr = "Number of voices for DAC" |
|
1525 |
}, |
|
1516 | 1526 |
/* ADC */ |
1517 |
{.name = "ADC_FIXED_SETTINGS", |
|
1518 |
.tag = AUD_OPT_BOOL, |
|
1519 |
.valp = &conf.fixed_in.enabled, |
|
1520 |
.descr = "Use fixed settings for host ADC"}, |
|
1521 |
{.name = "ADC_FIXED_FREQ", |
|
1522 |
.tag = AUD_OPT_INT, |
|
1523 |
.valp = &conf.fixed_in.settings.freq, |
|
1524 |
.descr = "Frequency for fixed host ADC"}, |
|
1525 |
{.name = "ADC_FIXED_FMT", |
|
1526 |
.tag = AUD_OPT_FMT, |
|
1527 |
.valp = &conf.fixed_in.settings.fmt, |
|
1528 |
.descr = "Format for fixed host ADC"}, |
|
1529 |
{.name = "ADC_FIXED_CHANNELS", |
|
1530 |
.tag = AUD_OPT_INT, |
|
1531 |
.valp = &conf.fixed_in.settings.nchannels, |
|
1532 |
.descr = "Number of channels for fixed ADC (1 - mono, 2 - stereo)"}, |
|
1533 |
{.name = "ADC_VOICES", |
|
1534 |
.tag = AUD_OPT_INT, |
|
1535 |
.valp = &conf.fixed_in.nb_voices, |
|
1536 |
.descr = "Number of voices for ADC"}, |
|
1527 |
{ |
|
1528 |
.name = "ADC_FIXED_SETTINGS", |
|
1529 |
.tag = AUD_OPT_BOOL, |
|
1530 |
.valp = &conf.fixed_in.enabled, |
|
1531 |
.descr = "Use fixed settings for host ADC" |
|
1532 |
}, |
|
1533 |
{ |
|
1534 |
.name = "ADC_FIXED_FREQ", |
|
1535 |
.tag = AUD_OPT_INT, |
|
1536 |
.valp = &conf.fixed_in.settings.freq, |
|
1537 |
.descr = "Frequency for fixed host ADC" |
|
1538 |
}, |
|
1539 |
{ |
|
1540 |
.name = "ADC_FIXED_FMT", |
|
1541 |
.tag = AUD_OPT_FMT, |
|
1542 |
.valp = &conf.fixed_in.settings.fmt, |
|
1543 |
.descr = "Format for fixed host ADC" |
|
1544 |
}, |
|
1545 |
{ |
|
1546 |
.name = "ADC_FIXED_CHANNELS", |
|
1547 |
.tag = AUD_OPT_INT, |
|
1548 |
.valp = &conf.fixed_in.settings.nchannels, |
|
1549 |
.descr = "Number of channels for fixed ADC (1 - mono, 2 - stereo)" |
|
1550 |
}, |
|
1551 |
{ |
|
1552 |
.name = "ADC_VOICES", |
|
1553 |
.tag = AUD_OPT_INT, |
|
1554 |
.valp = &conf.fixed_in.nb_voices, |
|
1555 |
.descr = "Number of voices for ADC" |
|
1556 |
}, |
|
1537 | 1557 |
/* Misc */ |
1538 |
{.name = "TIMER_PERIOD", |
|
1539 |
.tag = AUD_OPT_INT, |
|
1540 |
.valp = &conf.period.hertz, |
|
1541 |
.descr = "Timer period in HZ (0 - use lowest possible)"}, |
|
1542 |
{.name = "PLIVE", |
|
1543 |
.tag = AUD_OPT_BOOL, |
|
1544 |
.valp = &conf.plive, |
|
1545 |
.descr = "(undocumented)"}, |
|
1546 |
{.name = "LOG_TO_MONITOR", |
|
1547 |
.tag = AUD_OPT_BOOL, |
|
1548 |
.valp = &conf.log_to_monitor, |
|
1549 |
.descr = ".descr = print logging messages to monitor instead of stderr"}, |
|
1558 |
{ |
|
1559 |
.name = "TIMER_PERIOD", |
|
1560 |
.tag = AUD_OPT_INT, |
|
1561 |
.valp = &conf.period.hertz, |
|
1562 |
.descr = "Timer period in HZ (0 - use lowest possible)" |
|
1563 |
}, |
|
1564 |
{ |
|
1565 |
.name = "PLIVE", |
|
1566 |
.tag = AUD_OPT_BOOL, |
|
1567 |
.valp = &conf.plive, |
|
1568 |
.descr = "(undocumented)" |
|
1569 |
}, |
|
1570 |
{ |
|
1571 |
.name = "LOG_TO_MONITOR", |
|
1572 |
.tag = AUD_OPT_BOOL, |
|
1573 |
.valp = &conf.log_to_monitor, |
|
1574 |
.descr = ".descr = print logging messages to monitor instead of stderr" |
|
1575 |
}, |
|
1550 | 1576 |
{ /* End of list */ } |
1551 | 1577 |
}; |
1552 | 1578 |
|
b/audio/coreaudio.c | ||
---|---|---|
513 | 513 |
} |
514 | 514 |
|
515 | 515 |
static struct audio_option coreaudio_options[] = { |
516 |
{.name = "BUFFER_SIZE", |
|
517 |
.tag = AUD_OPT_INT, |
|
518 |
.valp = &conf.buffer_frames, |
|
519 |
.descr = "Size of the buffer in frames"}, |
|
520 |
{.name = "BUFFER_COUNT", |
|
521 |
.tag = AUD_OPT_INT, |
|
522 |
.valp = &conf.nbuffers, |
|
523 |
.descr = "Number of buffers"}, |
|
516 |
{ |
|
517 |
.name = "BUFFER_SIZE", |
|
518 |
.tag = AUD_OPT_INT, |
|
519 |
.valp = &conf.buffer_frames, |
|
520 |
.descr = "Size of the buffer in frames" |
|
521 |
}, |
|
522 |
{ |
|
523 |
.name = "BUFFER_COUNT", |
|
524 |
.tag = AUD_OPT_INT, |
|
525 |
.valp = &conf.nbuffers, |
|
526 |
.descr = "Number of buffers" |
|
527 |
}, |
|
524 | 528 |
{ /* End of list */ } |
525 | 529 |
}; |
526 | 530 |
|
b/audio/dsoundaudio.c | ||
---|---|---|
1033 | 1033 |
} |
1034 | 1034 |
|
1035 | 1035 |
static struct audio_option dsound_options[] = { |
1036 |
{.name = "LOCK_RETRIES", |
|
1037 |
.tag = AUD_OPT_INT, |
|
1038 |
.valp = &conf.lock_retries, |
|
1039 |
.descr = "Number of times to attempt locking the buffer"}, |
|
1040 |
{.name = "RESTOURE_RETRIES", |
|
1041 |
.tag = AUD_OPT_INT, |
|
1042 |
.valp = &conf.restore_retries, |
|
1043 |
.descr = "Number of times to attempt restoring the buffer"}, |
|
1044 |
{.name = "GETSTATUS_RETRIES", |
|
1045 |
.tag = AUD_OPT_INT, |
|
1046 |
.valp = &conf.getstatus_retries, |
|
1047 |
.descr = "Number of times to attempt getting status of the buffer"}, |
|
1048 |
{.name = "SET_PRIMARY", |
|
1049 |
.tag = AUD_OPT_BOOL, |
|
1050 |
.valp = &conf.set_primary |
|
1051 |
.descr = "Set the parameters of primary buffer"}, |
|
1052 |
{.name = "LATENCY_MILLIS", |
|
1053 |
.tag = AUD_OPT_INT, |
|
1054 |
.valp = &conf.latency_millis, |
|
1055 |
.descr = "(undocumented)"}, |
|
1056 |
{.name = "PRIMARY_FREQ", |
|
1057 |
.tag = AUD_OPT_INT, |
|
1058 |
.valp = &conf.settings.freq, |
|
1059 |
.descr = "Primary buffer frequency"}, |
|
1060 |
{.name = "PRIMARY_CHANNELS", |
|
1061 |
.tag = AUD_OPT_INT, |
|
1062 |
.valp = &conf.settings.nchannels, |
|
1063 |
.descr = "Primary buffer number of channels (1 - mono, 2 - stereo)"}, |
|
1064 |
{.name = "PRIMARY_FMT", |
|
1065 |
.tag = AUD_OPT_FMT, |
|
1066 |
.valp = &conf.settings.fmt, |
|
1067 |
.descr = "Primary buffer format"}, |
|
1068 |
{.name = "BUFSIZE_OUT", |
|
1069 |
.tag = AUD_OPT_INT, |
|
1070 |
.valp = &conf.bufsize_out, |
|
1071 |
.descr = "(undocumented)"}, |
|
1072 |
{.name = "BUFSIZE_IN", |
|
1073 |
.tag = AUD_OPT_INT, |
|
1074 |
.valp = &conf.bufsize_in, |
|
1075 |
.descr = "(undocumented)"}, |
|
1036 |
{ |
|
1037 |
.name = "LOCK_RETRIES", |
|
1038 |
.tag = AUD_OPT_INT, |
|
1039 |
.valp = &conf.lock_retries, |
|
1040 |
.descr = "Number of times to attempt locking the buffer" |
|
1041 |
}, |
|
1042 |
{ |
|
1043 |
.name = "RESTOURE_RETRIES", |
|
1044 |
.tag = AUD_OPT_INT, |
|
1045 |
.valp = &conf.restore_retries, |
|
1046 |
.descr = "Number of times to attempt restoring the buffer" |
|
1047 |
}, |
|
1048 |
{ |
|
1049 |
.name = "GETSTATUS_RETRIES", |
|
1050 |
.tag = AUD_OPT_INT, |
|
1051 |
.valp = &conf.getstatus_retries, |
|
1052 |
.descr = "Number of times to attempt getting status of the buffer" |
|
1053 |
}, |
|
1054 |
{ |
|
1055 |
.name = "SET_PRIMARY", |
|
1056 |
.tag = AUD_OPT_BOOL, |
|
1057 |
.valp = &conf.set_primary |
|
1058 |
.descr = "Set the parameters of primary buffer" |
|
1059 |
}, |
|
1060 |
{ |
|
1061 |
.name = "LATENCY_MILLIS", |
|
1062 |
.tag = AUD_OPT_INT, |
|
1063 |
.valp = &conf.latency_millis, |
|
1064 |
.descr = "(undocumented)" |
|
1065 |
}, |
|
1066 |
{ |
|
1067 |
.name = "PRIMARY_FREQ", |
|
1068 |
.tag = AUD_OPT_INT, |
|
1069 |
.valp = &conf.settings.freq, |
|
1070 |
.descr = "Primary buffer frequency" |
|
1071 |
}, |
|
1072 |
{ |
|
1073 |
.name = "PRIMARY_CHANNELS", |
|
1074 |
.tag = AUD_OPT_INT, |
|
1075 |
.valp = &conf.settings.nchannels, |
|
1076 |
.descr = "Primary buffer number of channels (1 - mono, 2 - stereo)" |
|
1077 |
}, |
|
1078 |
{ |
|
1079 |
.name = "PRIMARY_FMT", |
|
1080 |
.tag = AUD_OPT_FMT, |
|
1081 |
.valp = &conf.settings.fmt, |
|
1082 |
.descr = "Primary buffer format" |
|
1083 |
}, |
|
1084 |
{ |
|
1085 |
.name = "BUFSIZE_OUT", |
|
1086 |
.tag = AUD_OPT_INT, |
|
1087 |
.valp = &conf.bufsize_out, |
|
1088 |
.descr = "(undocumented)" |
|
1089 |
}, |
|
1090 |
{ |
|
1091 |
.name = "BUFSIZE_IN", |
|
1092 |
.tag = AUD_OPT_INT, |
|
1093 |
.valp = &conf.bufsize_in, |
|
1094 |
.descr = "(undocumented)" |
|
1095 |
}, |
|
1076 | 1096 |
{ /* End of list */ } |
1077 | 1097 |
}; |
1078 | 1098 |
|
b/audio/esdaudio.c | ||
---|---|---|
549 | 549 |
} |
550 | 550 |
|
551 | 551 |
struct audio_option qesd_options[] = { |
552 |
{.name = "SAMPLES", |
|
553 |
.tag = AUD_OPT_INT, |
|
554 |
.valp = &conf.samples, |
|
555 |
.descr = "buffer size in samples"}, |
|
556 |
{.name = "DIVISOR", |
|
557 |
.tag = AUD_OPT_INT, |
|
558 |
.valp = &conf.divisor, |
|
559 |
.descr = "threshold divisor"}, |
|
560 |
{.name = "DAC_HOST", |
|
561 |
.tag = AUD_OPT_STR, |
|
562 |
.valp = &conf.dac_host, |
|
563 |
.descr = "playback host"}, |
|
564 |
{.name = "ADC_HOST", |
|
565 |
.tag = AUD_OPT_STR, |
|
566 |
.valp = &conf.adc_host, |
|
567 |
.descr = "capture host"}, |
|
552 |
{ |
|
553 |
.name = "SAMPLES", |
|
554 |
.tag = AUD_OPT_INT, |
|
555 |
.valp = &conf.samples, |
|
556 |
.descr = "buffer size in samples" |
|
557 |
}, |
|
558 |
{ |
|
559 |
.name = "DIVISOR", |
|
560 |
.tag = AUD_OPT_INT, |
|
561 |
.valp = &conf.divisor, |
|
562 |
.descr = "threshold divisor" |
|
563 |
}, |
|
564 |
{ |
|
565 |
.name = "DAC_HOST", |
|
566 |
.tag = AUD_OPT_STR, |
|
567 |
.valp = &conf.dac_host, |
|
568 |
.descr = "playback host" |
|
569 |
}, |
|
570 |
{ |
|
571 |
.name = "ADC_HOST", |
|
572 |
.tag = AUD_OPT_STR, |
|
573 |
.valp = &conf.adc_host, |
|
574 |
.descr = "capture host" |
|
575 |
}, |
|
568 | 576 |
{ /* End of list */ } |
569 | 577 |
}; |
570 | 578 |
|
b/audio/fmodaudio.c | ||
---|---|---|
513 | 513 |
const char *name; |
514 | 514 |
int type; |
515 | 515 |
} drvtab[] = { |
516 |
{.name = "none", |
|
517 |
.type = FSOUND_OUTPUT_NOSOUND}, |
|
516 |
{ .name = "none", .type = FSOUND_OUTPUT_NOSOUND }, |
|
518 | 517 |
#ifdef _WIN32 |
519 |
{.name = "winmm", |
|
520 |
.type = FSOUND_OUTPUT_WINMM}, |
|
521 |
{.name = "dsound", |
|
522 |
.type = FSOUND_OUTPUT_DSOUND}, |
|
523 |
{.name = "a3d", |
|
524 |
.type = FSOUND_OUTPUT_A3D}, |
|
525 |
{.name = "asio", |
|
526 |
.type = FSOUND_OUTPUT_ASIO}, |
|
518 |
{ .name = "winmm", .type = FSOUND_OUTPUT_WINMM }, |
|
519 |
{ .name = "dsound", .type = FSOUND_OUTPUT_DSOUND }, |
|
520 |
{ .name = "a3d", .type = FSOUND_OUTPUT_A3D }, |
|
521 |
{ .name = "asio", .type = FSOUND_OUTPUT_ASIO }, |
|
527 | 522 |
#endif |
528 | 523 |
#ifdef __linux__ |
529 |
{.name = "oss", |
|
530 |
.type = FSOUND_OUTPUT_OSS}, |
|
531 |
{.name = "alsa", |
|
532 |
.type = FSOUND_OUTPUT_ALSA}, |
|
533 |
{.name = "esd", |
|
534 |
.type = FSOUND_OUTPUT_ESD}, |
|
524 |
{ .name = "oss", .type = FSOUND_OUTPUT_OSS }, |
|
525 |
{ .name = "alsa", .type = FSOUND_OUTPUT_ALSA }, |
|
526 |
{ .name = "esd", .type = FSOUND_OUTPUT_ESD }, |
|
535 | 527 |
#endif |
536 | 528 |
#ifdef __APPLE__ |
537 |
{.name = "mac", |
|
538 |
.type = FSOUND_OUTPUT_MAC}, |
|
529 |
{ .name = "mac", .type = FSOUND_OUTPUT_MAC }, |
|
539 | 530 |
#endif |
540 | 531 |
#if 0 |
541 |
{.name = "xbox", |
|
542 |
.type = FSOUND_OUTPUT_XBOX}, |
|
543 |
{.name = "ps2", |
|
544 |
.type = FSOUND_OUTPUT_PS2}, |
|
545 |
{.name = "gcube", |
|
546 |
.type = FSOUND_OUTPUT_GC}, |
|
532 |
{ .name = "xbox", .type = FSOUND_OUTPUT_XBOX }, |
|
533 |
{ .name = "ps2", .type = FSOUND_OUTPUT_PS2 }, |
|
534 |
{ .name = "gcube", .type = FSOUND_OUTPUT_GC }, |
|
547 | 535 |
#endif |
548 |
{.name = "none-realtime", |
|
549 |
.type = FSOUND_OUTPUT_NOSOUND_NONREALTIME} |
|
536 |
{ .name = "none-realtime", .type = FSOUND_OUTPUT_NOSOUND_NONREALTIME } |
|
550 | 537 |
}; |
551 | 538 |
|
552 | 539 |
static void *fmod_audio_init (void) |
... | ... | |
648 | 635 |
} |
649 | 636 |
|
650 | 637 |
static struct audio_option fmod_options[] = { |
651 |
{.name = "DRV", |
|
652 |
.tag = AUD_OPT_STR, |
|
653 |
.valp = &conf.drvname, |
|
654 |
.descr = "FMOD driver"}, |
|
655 |
{.name = "FREQ", |
|
656 |
.tag = AUD_OPT_INT, |
|
657 |
.valp = &conf.freq, |
|
658 |
.descr = "Default frequency"}, |
|
659 |
{.name = "SAMPLES", |
|
660 |
.tag = AUD_OPT_INT, |
|
661 |
.valp = &conf.nb_samples, |
|
662 |
.descr = "Buffer size in samples"}, |
|
663 |
{.name = "CHANNELS", |
|
664 |
.tag = AUD_OPT_INT, |
|
665 |
.valp = &conf.nb_channels, |
|
666 |
.descr = "Number of default channels (1 - mono, 2 - stereo)"}, |
|
667 |
{.name = "BUFSIZE", |
|
668 |
.tag = AUD_OPT_INT, |
|
669 |
.valp = &conf.bufsize, |
|
670 |
.descr = "(undocumented)"} |
|
638 |
{ |
|
639 |
.name = "DRV", |
|
640 |
.tag = AUD_OPT_STR, |
|
641 |
.valp = &conf.drvname, |
|
642 |
.descr = "FMOD driver" |
|
643 |
}, |
|
644 |
{ |
|
645 |
.name = "FREQ", |
|
646 |
.tag = AUD_OPT_INT, |
|
647 |
.valp = &conf.freq, |
|
648 |
.descr = "Default frequency" |
|
649 |
}, |
|
650 |
{ |
|
651 |
.name = "SAMPLES", |
|
652 |
.tag = AUD_OPT_INT, |
|
653 |
.valp = &conf.nb_samples, |
|
654 |
.descr = "Buffer size in samples" |
|
655 |
}, |
|
656 |
{ |
|
657 |
.name = "CHANNELS", |
|
658 |
.tag = AUD_OPT_INT, |
|
659 |
.valp = &conf.nb_channels, |
|
660 |
.descr = "Number of default channels (1 - mono, 2 - stereo)" |
|
661 |
}, |
|
662 |
{ |
|
663 |
.name = "BUFSIZE", |
|
664 |
.tag = AUD_OPT_INT, |
|
665 |
.valp = &conf.bufsize, |
|
666 |
.descr = "(undocumented)" |
|
667 |
} |
|
671 | 668 |
#if 0 |
672 |
{.name = "THRESHOLD", |
|
673 |
.tag = AUD_OPT_INT, |
|
674 |
.valp = &conf.threshold, |
|
675 |
.descr = "(undocumented)"} |
|
669 |
{ |
|
670 |
.name = "THRESHOLD", |
|
671 |
.tag = AUD_OPT_INT, |
|
672 |
.valp = &conf.threshold, |
|
673 |
.descr = "(undocumented)" |
|
674 |
} |
|
676 | 675 |
#endif |
677 | 676 |
{ /* End of list */ } |
678 | 677 |
}; |
... | ... | |
684 | 683 |
.write = fmod_write, |
685 | 684 |
.ctl_out = fmod_ctl_out, |
686 | 685 |
|
687 |
.init_in = fmod_init_in, |
|
688 |
.fini_in = fmod_fini_in, |
|
689 |
.run_in = fmod_run_in, |
|
690 |
.read = fmod_read, |
|
691 |
.ctl_in = fmod_ctl_in |
|
686 |
.init_in = fmod_init_in,
|
|
687 |
.fini_in = fmod_fini_in,
|
|
688 |
.run_in = fmod_run_in,
|
|
689 |
.read = fmod_read,
|
|
690 |
.ctl_in = fmod_ctl_in
|
|
692 | 691 |
}; |
693 | 692 |
|
694 | 693 |
struct audio_driver fmod_audio_driver = { |
b/audio/ossaudio.c | ||
---|---|---|
654 | 654 |
int add; |
655 | 655 |
int len; |
656 | 656 |
} bufs[2] = { |
657 |
{.add = hw->wpos, |
|
658 |
.len = 0}, |
|
659 |
{.add = 0, |
|
660 |
.len = 0} |
|
657 |
{ .add = hw->wpos, .len = 0 }, |
|
658 |
{ .add = 0, .len = 0 } |
|
661 | 659 |
}; |
662 | 660 |
|
663 | 661 |
if (!dead) { |
... | ... | |
738 | 736 |
} |
739 | 737 |
|
740 | 738 |
static struct audio_option oss_options[] = { |
741 |
{.name = "FRAGSIZE", |
|
742 |
.tag = AUD_OPT_INT, |
|
743 |
.valp = &conf.fragsize, |
|
744 |
.descr = "Fragment size in bytes"}, |
|
745 |
{.name = "NFRAGS", |
|
746 |
.tag = AUD_OPT_INT, |
|
747 |
.valp = &conf.nfrags, |
|
748 |
.descr = "Number of fragments"}, |
|
749 |
{.name = "MMAP", |
|
750 |
.tag = AUD_OPT_BOOL, |
|
751 |
.valp = &conf.try_mmap, |
|
752 |
.descr = "Try using memory mapped access"}, |
|
753 |
{.name = "DAC_DEV", |
|
754 |
.tag = AUD_OPT_STR, |
|
755 |
.valp = &conf.devpath_out, |
|
756 |
.descr = "Path to DAC device"}, |
|
757 |
{.name = "ADC_DEV", |
|
758 |
.tag = AUD_OPT_STR, |
|
759 |
.valp = &conf.devpath_in, |
|
760 |
.descr = "Path to ADC device"}, |
|
761 |
{.name = "DEBUG", |
|
762 |
.tag = AUD_OPT_BOOL, |
|
763 |
.valp = &conf.debug, |
|
764 |
.descr = "Turn on some debugging messages"}, |
|
739 |
{ |
|
740 |
.name = "FRAGSIZE", |
|
741 |
.tag = AUD_OPT_INT, |
|
742 |
.valp = &conf.fragsize, |
|
743 |
.descr = "Fragment size in bytes" |
|
744 |
}, |
|
745 |
{ |
|
746 |
.name = "NFRAGS", |
|
747 |
.tag = AUD_OPT_INT, |
|
748 |
.valp = &conf.nfrags, |
|
749 |
.descr = "Number of fragments" |
|
750 |
}, |
|
751 |
{ |
|
752 |
.name = "MMAP", |
|
753 |
.tag = AUD_OPT_BOOL, |
|
754 |
.valp = &conf.try_mmap, |
|
755 |
.descr = "Try using memory mapped access" |
|
756 |
}, |
|
757 |
{ |
|
758 |
.name = "DAC_DEV", |
|
759 |
.tag = AUD_OPT_STR, |
|
760 |
.valp = &conf.devpath_out, |
|
761 |
.descr = "Path to DAC device" |
|
762 |
}, |
|
763 |
{ |
|
764 |
.name = "ADC_DEV", |
|
765 |
.tag = AUD_OPT_STR, |
|
766 |
.valp = &conf.devpath_in, |
|
767 |
.descr = "Path to ADC device" |
|
768 |
}, |
|
769 |
{ |
|
770 |
.name = "DEBUG", |
|
771 |
.tag = AUD_OPT_BOOL, |
|
772 |
.valp = &conf.debug, |
|
773 |
.descr = "Turn on some debugging messages" |
|
774 |
}, |
|
765 | 775 |
{ /* End of list */ } |
766 | 776 |
}; |
767 | 777 |
|
b/audio/paaudio.c | ||
---|---|---|
466 | 466 |
} |
467 | 467 |
|
468 | 468 |
struct audio_option qpa_options[] = { |
469 |
{.name = "SAMPLES", |
|
470 |
.tag = AUD_OPT_INT, |
|
471 |
.valp = &conf.samples, |
|
472 |
.descr = "buffer size in samples"}, |
|
473 |
{.name = "DIVISOR", |
|
474 |
.tag = AUD_OPT_INT, |
|
475 |
.valp = &conf.divisor, |
|
476 |
.descr = "threshold divisor"}, |
|
477 |
{.name = "SERVER", |
|
478 |
.tag = AUD_OPT_STR, |
|
479 |
.valp = &conf.server, |
|
480 |
.descr = "server address"}, |
|
481 |
{.name = "SINK", |
|
482 |
.tag = AUD_OPT_STR, |
|
483 |
.valp = &conf.sink, |
|
484 |
.descr = "sink device name"}, |
|
485 |
{.name = "SOURCE", |
|
486 |
.tag = AUD_OPT_STR, |
|
487 |
.valp = &conf.source, |
|
488 |
.descr = "source device name"}, |
|
469 |
{ |
|
470 |
.name = "SAMPLES", |
|
471 |
.tag = AUD_OPT_INT, |
|
472 |
.valp = &conf.samples, |
|
473 |
.descr = "buffer size in samples" |
|
474 |
}, |
|
475 |
{ |
|
476 |
.name = "DIVISOR", |
|
477 |
.tag = AUD_OPT_INT, |
|
478 |
.valp = &conf.divisor, |
|
479 |
.descr = "threshold divisor" |
|
480 |
}, |
|
481 |
{ |
|
482 |
.name = "SERVER", |
|
483 |
.tag = AUD_OPT_STR, |
|
484 |
.valp = &conf.server, |
|
485 |
.descr = "server address" |
|
486 |
}, |
|
487 |
{ |
|
488 |
.name = "SINK", |
|
489 |
.tag = AUD_OPT_STR, |
|
490 |
.valp = &conf.sink, |
|
491 |
.descr = "sink device name" |
|
492 |
}, |
|
493 |
{ |
|
494 |
.name = "SOURCE", |
|
495 |
.tag = AUD_OPT_STR, |
|
496 |
.valp = &conf.source, |
|
497 |
.descr = "source device name" |
|
498 |
}, |
|
489 | 499 |
{ /* End of list */ } |
490 | 500 |
}; |
491 | 501 |
|
b/audio/sdlaudio.c | ||
---|---|---|
420 | 420 |
} |
421 | 421 |
|
422 | 422 |
static struct audio_option sdl_options[] = { |
423 |
{.name = "SAMPLES", |
|
424 |
.tag = AUD_OPT_INT, |
|
425 |
.valp = &conf.nb_samples, |
|
426 |
.descr = "Size of SDL buffer in samples"}, |
|
423 |
{ |
|
424 |
.name = "SAMPLES", |
|
425 |
.tag = AUD_OPT_INT, |
|
426 |
.valp = &conf.nb_samples, |
|
427 |
.descr = "Size of SDL buffer in samples" |
|
428 |
}, |
|
427 | 429 |
{ /* End of list */ } |
428 | 430 |
}; |
429 | 431 |
|
b/audio/wavaudio.c | ||
---|---|---|
216 | 216 |
} |
217 | 217 |
|
218 | 218 |
static struct audio_option wav_options[] = { |
219 |
{.name = "FREQUENCY", |
|
220 |
.tag = AUD_OPT_INT, |
|
221 |
.valp = &conf.settings.freq, |
|
222 |
.descr = "Frequency"}, |
|
223 |
{.name = "FORMAT", |
|
224 |
.tag = AUD_OPT_FMT, |
|
225 |
.valp = &conf.settings.fmt, |
|
226 |
.descr = "Format"}, |
|
227 |
{.name = "DAC_FIXED_CHANNELS", |
|
228 |
.tag = AUD_OPT_INT, |
|
229 |
.valp = &conf.settings.nchannels, |
|
230 |
.descr = "Number of channels (1 - mono, 2 - stereo)"}, |
|
231 |
{.name = "PATH", |
|
232 |
.tag = AUD_OPT_STR, |
|
233 |
.valp = &conf.wav_path, |
|
234 |
.descr = "Path to wave file"}, |
|
219 |
{ |
|
220 |
.name = "FREQUENCY", |
|
221 |
.tag = AUD_OPT_INT, |
|
222 |
.valp = &conf.settings.freq, |
|
223 |
.descr = "Frequency" |
|
224 |
}, |
|
225 |
{ |
|
226 |
.name = "FORMAT", |
|
227 |
.tag = AUD_OPT_FMT, |
|
228 |
.valp = &conf.settings.fmt, |
|
229 |
.descr = "Format" |
|
230 |
}, |
|
231 |
{ |
|
232 |
.name = "DAC_FIXED_CHANNELS", |
|
233 |
.tag = AUD_OPT_INT, |
|
234 |
.valp = &conf.settings.nchannels, |
|
235 |
.descr = "Number of channels (1 - mono, 2 - stereo)" |
|
236 |
}, |
|
237 |
{ |
|
238 |
.name = "PATH", |
|
239 |
.tag = AUD_OPT_STR, |
|
240 |
.valp = &conf.wav_path, |
|
241 |
.descr = "Path to wave file" |
|
242 |
}, |
|
235 | 243 |
{ /* End of list */ } |
236 | 244 |
}; |
237 | 245 |
|
... | ... | |
249 | 257 |
.options = wav_options, |
250 | 258 |
.init = wav_audio_init, |
251 | 259 |
.fini = wav_audio_fini, |
252 |
.pcm_ops = &wav_pcm_ops, |
|
260 |
.pcm_ops = &wav_pcm_ops,
|
|
253 | 261 |
.can_be_default = 0, |
254 | 262 |
.max_voices_out = 1, |
255 | 263 |
.max_voices_in = 0, |
Also available in: Unified diff