Also implemented the "pound" and "star" DTMF tones (also from audiocheck.net)
This commit is contained in:
parent
7ffce8b616
commit
0858155f23
2
Makefile
2
Makefile
|
@ -32,6 +32,8 @@ dist:
|
|||
$(PACKAGE)-$(VERSION)/data/7.wav \
|
||||
$(PACKAGE)-$(VERSION)/data/8.wav \
|
||||
$(PACKAGE)-$(VERSION)/data/9.wav \
|
||||
$(PACKAGE)-$(VERSION)/data/hash.wav \
|
||||
$(PACKAGE)-$(VERSION)/data/star.wav \
|
||||
$(PACKAGE)-$(VERSION)/data/phone-contacts.desktop \
|
||||
$(PACKAGE)-$(VERSION)/data/phone-dialer.desktop \
|
||||
$(PACKAGE)-$(VERSION)/data/phone-log.desktop \
|
||||
|
|
|
@ -39,6 +39,10 @@ install:
|
|||
$(INSTALL) -m 0644 8.wav $(DESTDIR)$(PREFIX)/share/sounds/Phone/8.wav
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/sounds/Phone
|
||||
$(INSTALL) -m 0644 9.wav $(DESTDIR)$(PREFIX)/share/sounds/Phone/9.wav
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/sounds/Phone
|
||||
$(INSTALL) -m 0644 hash.wav $(DESTDIR)$(PREFIX)/share/sounds/Phone/hash.wav
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/sounds/Phone
|
||||
$(INSTALL) -m 0644 star.wav $(DESTDIR)$(PREFIX)/share/sounds/Phone/star.wav
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/applications
|
||||
$(INSTALL) -m 0644 phone-contacts.desktop $(DESTDIR)$(PREFIX)/share/applications/phone-contacts.desktop
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/applications
|
||||
|
@ -64,6 +68,8 @@ uninstall:
|
|||
$(RM) -- $(DESTDIR)$(PREFIX)/share/sounds/Phone/7.wav
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/sounds/Phone/8.wav
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/sounds/Phone/9.wav
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/sounds/Phone/hash.wav
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/sounds/Phone/star.wav
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/applications/phone-contacts.desktop
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/applications/phone-dialer.desktop
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/applications/phone-log.desktop
|
||||
|
|
BIN
data/hash.wav
Normal file
BIN
data/hash.wav
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
subdirs=16x16,22x22,24x24,32x32,48x48
|
||||
dist=Makefile,0.wav,1.wav,2.wav,3.wav,4.wav,5.wav,6.wav,7.wav,8.wav,9.wav,phone-contacts.desktop,phone-dialer.desktop,phone-log.desktop,phone-messages.desktop,phone-settings.desktop,phone-sofia.desktop
|
||||
dist=Makefile,0.wav,1.wav,2.wav,3.wav,4.wav,5.wav,6.wav,7.wav,8.wav,9.wav,hash.wav,star.wav,phone-contacts.desktop,phone-dialer.desktop,phone-log.desktop,phone-messages.desktop,phone-settings.desktop,phone-sofia.desktop
|
||||
|
||||
[0.wav]
|
||||
install=$(PREFIX)/share/sounds/Phone
|
||||
|
@ -31,6 +31,12 @@ install=$(PREFIX)/share/sounds/Phone
|
|||
[9.wav]
|
||||
install=$(PREFIX)/share/sounds/Phone
|
||||
|
||||
[hash.wav]
|
||||
install=$(PREFIX)/share/sounds/Phone
|
||||
|
||||
[star.wav]
|
||||
install=$(PREFIX)/share/sounds/Phone
|
||||
|
||||
[phone-contacts.desktop]
|
||||
install=$(PREFIX)/share/applications
|
||||
|
||||
|
|
BIN
data/star.wav
Normal file
BIN
data/star.wav
Normal file
Binary file not shown.
|
@ -897,12 +897,15 @@ int phone_dialer_append(Phone * phone, char character)
|
|||
if(phone->ca_status == MODEM_CALL_STATUS_ACTIVE && character != '+')
|
||||
modem_request_type(phone->modem, MODEM_REQUEST_DTMF_SEND,
|
||||
character);
|
||||
else if(phone->ca_status != MODEM_CALL_STATUS_ACTIVE
|
||||
&& character >= '0' && character <= '9')
|
||||
if(character >= '0' && character <= '9')
|
||||
{
|
||||
sample[0] = character;
|
||||
phone_event_type(phone, PHONE_EVENT_TYPE_AUDIO_PLAY, sample);
|
||||
}
|
||||
else if(character == '#')
|
||||
phone_event_type(phone, PHONE_EVENT_TYPE_AUDIO_PLAY, "hash");
|
||||
else if(character == '*')
|
||||
phone_event_type(phone, PHONE_EVENT_TYPE_AUDIO_PLAY, "star");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user