diff options
author | Jörg Müller <nexyon@gmail.com> | 2015-07-24 16:44:17 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2015-07-28 15:01:53 +0300 |
commit | 29ebb56f4d8b99ca3038c7a3d0ed794ef77ee7f9 (patch) | |
tree | 32f1dae9ea80dd3c1843f5cc00ecceea23da5dc4 /source/blender/makesrna | |
parent | a0cbebf404d6c46e59b090e7217ce39d7e760809 (diff) |
Audaspace: support the device list returned by the new audaspace library.
- use the device names returned from the library.
- system settings UI changed as new audaspace might contain longer and more device names.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b2af13aa106..1392009a30d 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -127,6 +127,7 @@ EnumPropertyItem navigation_mode_items[] = { # include "sdlew.h" #endif + static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { WM_main_add_notifier(NC_WINDOW, NULL); @@ -610,6 +611,17 @@ static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi int totitem = 0; EnumPropertyItem *item = NULL; +#ifdef WITH_SYSTEM_AUDASPACE + int i; + + char** names = BKE_sound_get_device_names(); + + for(i = 0; names[i]; i++) + { + EnumPropertyItem new_item = {i, names[i], 0, names[i], names[i]}; + RNA_enum_item_add(&item, &totitem, &new_item); + } +#else /* NONE */ RNA_enum_item_add(&item, &totitem, &audio_device_items[index++]); @@ -633,6 +645,7 @@ static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi } index++; #endif +#endif RNA_enum_item_end(&item, &totitem); *r_free = true; |