Gammu internals
1.38.0
|
#include <gammu-ringtone.h>
Go to the source code of this file.
Macros | |
#define | SM_CommandEnd_CommandEnd 0x00 |
#define | SM_Command_RingingToneProgramming (0x25 << 1) |
#define | SM_Command_Sound (0x1d << 1) |
#define | SM_Song_BasicSongType (0x01 << 5) |
#define | SM_PatternID_A_part (0x00 << 6) |
#define | SM_InstructionID_PatternHeaderId (0x00 << 5) |
#define | SM_InstructionID_NoteInstructionId (0x01 << 5) |
#define | SM_InstructionID_ScaleInstructionId (0x02 << 5) |
#define | SM_InstructionID_StyleInstructionId (0x03 << 5) |
#define | SM_InstructionID_TempoInstructionId (0x04 << 5) |
#define | SM_InstructionID_VolumeInstructionId (0x05 << 5) |
Enumerations | |
enum | GSM_RingtoneVersion { GSM_Ring_NoHeader = 1, GSM_Ring_PartialHeader, GSM_Ring_IMelody10, GSM_Ring_IMelody12 } |
Functions | |
unsigned char | GSM_EncodeNokiaRTTLRingtone (GSM_Ringtone *ringtone, unsigned char *package, size_t *maxlength) |
unsigned char | GSM_EncodeEMSSound (GSM_Ringtone *ringtone, unsigned char *package, size_t *maxlength, GSM_RingtoneVersion version, gboolean start) |
GSM_Error | GSM_DecodeNokiaRTTLRingtone (GSM_Ringtone *ringtone, unsigned char *package, size_t maxlength) |
int | GSM_RingNoteGetFrequency (GSM_RingNote Note) |
int | GSM_RingNoteGetFullDuration (GSM_RingNote Note) |
#define SM_Command_RingingToneProgramming (0x25 << 1) |
Definition at line 12 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_Command_Sound (0x1d << 1) |
Definition at line 13 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_CommandEnd_CommandEnd 0x00 |
Definition at line 9 of file gsmring.h.
Referenced by GSM_EncodeNokiaRTTLRingtone().
#define SM_InstructionID_NoteInstructionId (0x01 << 5) |
Definition at line 23 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_InstructionID_PatternHeaderId (0x00 << 5) |
Definition at line 22 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_InstructionID_ScaleInstructionId (0x02 << 5) |
Definition at line 24 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_InstructionID_StyleInstructionId (0x03 << 5) |
Definition at line 25 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_InstructionID_TempoInstructionId (0x04 << 5) |
Definition at line 26 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
#define SM_InstructionID_VolumeInstructionId (0x05 << 5) |
Definition at line 27 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone().
#define SM_PatternID_A_part (0x00 << 6) |
Definition at line 19 of file gsmring.h.
Referenced by GSM_EncodeNokiaRTTLRingtone().
#define SM_Song_BasicSongType (0x01 << 5) |
Definition at line 16 of file gsmring.h.
Referenced by GSM_DecodeNokiaRTTLRingtone(), and GSM_EncodeNokiaRTTLRingtone().
enum GSM_RingtoneVersion |
Enumerator | |
---|---|
GSM_Ring_NoHeader | No header and footer. |
GSM_Ring_PartialHeader | Partial header and footer. |
GSM_Ring_IMelody10 | IMelody 1.0. |
GSM_Ring_IMelody12 | IMelody 1.2. |
GSM_Error GSM_DecodeNokiaRTTLRingtone | ( | GSM_Ringtone * | ringtone, |
unsigned char * | package, | ||
size_t | maxlength | ||
) |
Definition at line 1128 of file gsmring.c.
References BufferAlignNumber(), GSM_NoteRingtone::Commands, CopyUnicodeString(), dbgprintf, DecodeUnicodeSpecialNOKIAChars(), GSM_RingNote::Duration, Duration_1_32, Duration_Full, GSM_RingNote::DurationSpec, EncodeUnicode(), ERR_NONE, ERR_NOTSUPPORTED, GSM_Ringtone::Format, GetBuffer(), GetBufferInt(), GSM_MAX_RINGTONE_NOTES, Length_2_3, GSM_Ringtone::Name, NaturalStyle, NoSpecialDuration, GSM_RingNote::Note, GSM_RingCommand::Note, Note_C, Note_H, Note_Pause, GSM_Ringtone::NoteTone, GSM_NoteRingtone::NrCommands, RING_Note, RING_NOTETONE, GSM_RingNote::Scale, Scale_880, SM_BeatsPerMinute, SM_Command_RingingToneProgramming, SM_Command_Sound, SM_InstructionID_NoteInstructionId, SM_InstructionID_PatternHeaderId, SM_InstructionID_ScaleInstructionId, SM_InstructionID_StyleInstructionId, SM_InstructionID_TempoInstructionId, SM_InstructionID_VolumeInstructionId, SM_Song_BasicSongType, StaccatoStyle, GSM_RingNote::Style, GSM_RingNote::Tempo, GSM_RingCommand::Type, and UnicodeLength().
Referenced by GSM_DecodeMultiPartSMS(), loadcommunicator(), and loadott().
unsigned char GSM_EncodeEMSSound | ( | GSM_Ringtone * | ringtone, |
unsigned char * | package, | ||
size_t * | maxlength, | ||
GSM_RingtoneVersion | version, | ||
gboolean | start | ||
) |
Definition at line 1565 of file gsmring.c.
References GSM_NoteRingtone::Commands, ContinuousStyle, dbgprintf, DecodeUnicodeString(), DottedNote, DoubleDottedNote, GSM_RingNote::Duration, Duration_1_16, Duration_1_2, Duration_1_32, Duration_1_4, Duration_1_8, Duration_Full, GSM_RingNote::DurationSpec, FALSE, GSM_Ring_IMelody10, GSM_Ring_IMelody12, GSM_Ring_NoHeader, INVALIDStyle, Length_2_3, GSM_Ringtone::Name, NaturalStyle, GSM_RingNote::Note, GSM_RingCommand::Note, Note_A, Note_Ais, Note_C, Note_Cis, Note_D, Note_Dis, Note_E, Note_F, Note_Fis, Note_G, Note_Gis, Note_H, Note_INVALID, Note_Pause, GSM_Ringtone::NoteTone, GSM_NoteRingtone::NrCommands, RING_DisableLED, RING_DisableLight, RING_DisableVibra, RING_EnableLED, RING_EnableLight, RING_EnableVibra, RING_Note, GSM_RingNote::Scale, Scale_880, StaccatoStyle, GSM_RingNote::Style, GSM_RingNote::Tempo, TRUE, and GSM_RingCommand::Type.
Referenced by GSM_EncodeEMSMultiPartSMS(), and GSM_SaveRingtoneIMelody().
unsigned char GSM_EncodeNokiaRTTLRingtone | ( | GSM_Ringtone * | ringtone, |
unsigned char * | package, | ||
size_t * | maxlength | ||
) |
Definition at line 992 of file gsmring.c.
References AddBuffer(), AddBufferByte(), GSM_NoteRingtone::AllNotesScale, BufferAlign(), BufferAlignNumber(), GSM_NoteRingtone::Commands, DecodeUnicodeString(), GSM_RingNote::Duration, GSM_RingNote::DurationSpec, EncodeUnicodeSpecialNOKIAChars(), FALSE, GSM_RTTLGetTempo(), GSM_Ringtone::Name, GSM_RingNote::Note, GSM_RingCommand::Note, Note_Pause, GSM_Ringtone::NoteTone, GSM_NoteRingtone::NrCommands, RING_Note, GSM_RingNote::Scale, SM_Command_RingingToneProgramming, SM_Command_Sound, SM_CommandEnd_CommandEnd, SM_InstructionID_NoteInstructionId, SM_InstructionID_PatternHeaderId, SM_InstructionID_ScaleInstructionId, SM_InstructionID_StyleInstructionId, SM_InstructionID_TempoInstructionId, SM_PatternID_A_part, SM_Song_BasicSongType, GSM_RingNote::Style, GSM_RingNote::Tempo, TRUE, GSM_RingCommand::Type, and UnicodeLength().
Referenced by GSM_EncodeMultiPartSMS(), GSM_EncodeSMS30MultiPartSMS(), and GSM_SaveRingtoneOtt().
int GSM_RingNoteGetFrequency | ( | GSM_RingNote | Note | ) |
Definition at line 40 of file gsmring.c.
References GSM_RingNote::Note, Note_A, Note_Ais, Note_C, Note_Cis, Note_D, Note_Dis, Note_E, Note_F, Note_Fis, Note_G, Note_Gis, Note_H, Note_INVALID, Note_Pause, GSM_RingNote::Scale, Scale_1760, Scale_3520, Scale_440, and Scale_880.
Referenced by GSM_SaveRingtoneWav(), and PHONE_RTTLPlayOneNote().
int GSM_RingNoteGetFullDuration | ( | GSM_RingNote | Note | ) |
Definition at line 76 of file gsmring.c.
References DottedNote, DoubleDottedNote, GSM_RingNote::Duration, Duration_1_16, Duration_1_2, Duration_1_32, Duration_1_4, Duration_1_8, Duration_Full, Duration_INVALID, GSM_RingNote::DurationSpec, DurationSpec_INVALID, Length_2_3, and NoSpecialDuration.
Referenced by GSM_SaveRingtoneMidi(), GSM_SaveRingtoneWav(), PHONE_RTTLPlayOneNote(), and RTTL2Binary().