Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. "If you add AUDIO_ENABLE = yes to your rules.mk, there's a couple different sounds that will automatically be enabled without any other configuration". i followed the docs and tried to trigger sound effects but with no success. things I did:
  2.  
  3.  
  4. in rules.mk:
  5. AUDIO_ENABLE = yes # Audio output on port C6
  6.  
  7. in config.h:
  8.  
  9. #define VENDOR_ID 0xFEFD
  10. #define PRODUCT_ID 0x9460
  11. #define DEVICE_VER 0x0001
  12. #define MANUFACTURER Alltrons IT
  13. #define PRODUCT Knops Mini
  14. #define DESCRIPTION Advanced 3x2 macrokeyboard
  15.  
  16. #define C6_AUDIO
  17. #define B6_AUDIO
  18.  
  19.  
  20. in keymap.c:
  21. float my_song[][2] = SONG(QWERTY_SOUND);
  22.  
  23.  
  24. to make sure its enabled:
  25.  
  26. LAYOUT(
  27. AU_ON,AU_OFF,KC_NO,KC_NO,TG(3),KC_NO),
  28.  
  29.  
  30. to force an output:
  31.  
  32. void led_init_ports() {
  33. PLAY_SONG(my_song);
  34. ...
  35.  
  36.  
  37. to force play it during macro execution:
  38.  
  39. const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
  40. switch (id) {
  41. case 0:
  42. if (record->event.pressed) {
  43. /*
  44. * This is Macro 0
  45. * Content: tglhf<enter>
  46. */
  47. PLAY_SONG(my_song);
  48. return MACRO( D(LCTL), D(LALT), T(DOWN), U(LALT), U(LCTL), END );
  49. }
  50. break;
  51.  
  52.  
  53. i tried different points to make sure its executed. do you have a working config?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement