evil_portal_speaker.c 444 B

12345678910111213141516171819
  1. #include "evil_portal_speaker.h"
  2. #include "../evil_portal_app_i.h"
  3. #define NOTE_INPUT 587.33f
  4. void evil_portal_play_input_sound() {
  5. float volume = 1.0f;
  6. if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(30)) {
  7. furi_hal_speaker_start(NOTE_INPUT, volume);
  8. }
  9. }
  10. void evil_portal_stop_all_sound() {
  11. if(furi_hal_speaker_is_mine()) {
  12. furi_hal_speaker_stop();
  13. furi_hal_speaker_release();
  14. }
  15. }