trunk/src/osd/osdcore.c
| r31129 | r31130 | |
| 232 | 232 | PortMidiStream *stm; |
| 233 | 233 | osd_midi_device *ret; |
| 234 | 234 | |
| 235 | | for (int i = 0; i < num_devs; i++) |
| 235 | if (!strcmp("default", devname)) |
| 236 | 236 | { |
| 237 | | pmInfo = Pm_GetDeviceInfo(i); |
| 237 | found_dev = Pm_GetDefaultInputDeviceID(); |
| 238 | } |
| 239 | else |
| 240 | { |
| 241 | for (int i = 0; i < num_devs; i++) |
| 242 | { |
| 243 | pmInfo = Pm_GetDeviceInfo(i); |
| 238 | 244 | |
| 239 | | if (pmInfo->input) |
| 240 | | { |
| 241 | | if (!strcmp(devname, pmInfo->name)) |
| 245 | if (pmInfo->input) |
| 242 | 246 | { |
| 243 | | found_dev = i; |
| 244 | | break; |
| 247 | if (!strcmp(devname, pmInfo->name)) |
| 248 | { |
| 249 | found_dev = i; |
| 250 | break; |
| 251 | } |
| 245 | 252 | } |
| 246 | 253 | } |
| 247 | 254 | } |
| r31129 | r31130 | |
| 279 | 286 | PortMidiStream *stm; |
| 280 | 287 | osd_midi_device *ret; |
| 281 | 288 | |
| 282 | | for (int i = 0; i < num_devs; i++) |
| 289 | if (!strcmp("default", devname)) |
| 283 | 290 | { |
| 284 | | pmInfo = Pm_GetDeviceInfo(i); |
| 291 | found_dev = Pm_GetDefaultOutputDeviceID(); |
| 292 | } |
| 293 | else |
| 294 | { |
| 295 | for (int i = 0; i < num_devs; i++) |
| 296 | { |
| 297 | pmInfo = Pm_GetDeviceInfo(i); |
| 285 | 298 | |
| 286 | | if (pmInfo->output) |
| 287 | | { |
| 288 | | if (!strcmp(devname, pmInfo->name)) |
| 299 | if (pmInfo->output) |
| 289 | 300 | { |
| 290 | | found_dev = i; |
| 291 | | break; |
| 301 | if (!strcmp(devname, pmInfo->name)) |
| 302 | { |
| 303 | found_dev = i; |
| 304 | break; |
| 305 | } |
| 292 | 306 | } |
| 293 | 307 | } |
| 294 | 308 | } |