• Home
  • Raw
  • Download

Lines Matching refs:probe

46 static gboolean probe_check (Probe * probe);
47 static int check_rate (Probe * probe, int irate);
57 Probe *probe; in main() local
65 probe = g_new0 (Probe, 1); in main()
66 probe->fd = fd; in main()
67 probe->format = AFMT_S16_LE; in main()
68 probe->n_channels = 2; in main()
70 probe_check (probe); in main()
71 g_array_sort (probe->rates, int_compare); in main()
72 for (i = 0; i < probe->rates->len; i++) { in main()
73 g_print ("%d\n", g_array_index (probe->rates, int, i)); in main()
76 g_array_free (probe->rates, TRUE); in main()
77 g_free (probe); in main()
80 probe = g_new0 (Probe, 1); in main()
81 probe->fd = fd; in main()
82 probe->format = AFMT_S16_LE; in main()
83 probe->n_channels = 1; in main()
85 probe_check (probe); in main()
86 for (i = 0; i < probe->rates->len; i++) { in main()
87 g_print ("%d\n", g_array_index (probe->rates, int, i)); in main()
90 probe = g_new0 (Probe, 1); in main()
91 probe->fd = fd; in main()
92 probe->format = AFMT_U8; in main()
93 probe->n_channels = 2; in main()
95 probe_check (probe); in main()
96 for (i = 0; i < probe->rates->len; i++) { in main()
97 g_print ("%d\n", g_array_index (probe->rates, int, i)); in main()
100 probe = g_new0 (Probe, 1); in main()
101 probe->fd = fd; in main()
102 probe->format = AFMT_U8; in main()
103 probe->n_channels = 1; in main()
105 probe_check (probe); in main()
106 for (i = 0; i < probe->rates->len; i++) { in main()
107 g_print ("%d\n", g_array_index (probe->rates, int, i)); in main()
115 probe_check (Probe * probe) in probe_check() argument
126 probe->rates = g_array_new (FALSE, FALSE, sizeof (int)); in probe_check()
128 probe->min = check_rate (probe, 1000); in probe_check()
130 probe->max = check_rate (probe, 100000); in probe_check()
132 add_range (ranges, probe->min + 1, probe->max - 1); in probe_check()
143 mid_ret = check_rate (probe, mid); in probe_check()
206 check_rate (Probe * probe, int irate) in check_rate() argument
213 format = probe->format; in check_rate()
214 n_channels = probe->n_channels; in check_rate()
216 ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format); in check_rate()
217 ioctl (probe->fd, SNDCTL_DSP_CHANNELS, &n_channels); in check_rate()
218 ioctl (probe->fd, SNDCTL_DSP_SPEED, &rate); in check_rate()
225 add_rate (probe->rates, rate); in check_rate()