eas_rtttldata.h revision 56c99cd2c2c1e6ab038dac5fced5b92ccf11ff6c
1/*---------------------------------------------------------------------------- 2 * 3 * File: 4 * eas_rtttldata.h 5 * 6 * Contents and purpose: 7 * SMF File Parser 8 * 9 * This file contains data declarations for the RTTTL parser. 10 * 11 * Copyright Sonic Network Inc. 2005 12 13 * Licensed under the Apache License, Version 2.0 (the "License"); 14 * you may not use this file except in compliance with the License. 15 * You may obtain a copy of the License at 16 * 17 * http://www.apache.org/licenses/LICENSE-2.0 18 * 19 * Unless required by applicable law or agreed to in writing, software 20 * distributed under the License is distributed on an "AS IS" BASIS, 21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the License for the specific language governing permissions and 23 * limitations under the License. 24 * 25 *---------------------------------------------------------------------------- 26 * Revision Control: 27 * $Revision: 82 $ 28 * $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $ 29 *---------------------------------------------------------------------------- 30*/ 31 32#ifndef EAS_RTTTLDATA_H 33#define EAS_RTTTLDATA_H 34 35#include "eas_data.h" 36 37 38/* maximum line size as specified in iMelody V1.2 spec */ 39#define MAX_LINE_SIZE 75 40 41/*---------------------------------------------------------------------------- 42 * 43 * S_RTTTL_DATA 44 * 45 * This structure contains the state data for the iMelody parser 46 *---------------------------------------------------------------------------- 47*/ 48 49typedef struct 50{ 51 EAS_FILE_HANDLE fileHandle; /* file handle */ 52 S_SYNTH *pSynth; /* synthesizer handle */ 53 S_METADATA_CB metadata; /* metadata callback */ 54 EAS_I32 fileOffset; /* offset to start of data */ 55 EAS_I32 time; /* current time in 256ths of a msec */ 56 EAS_I32 tick; /* length of 32nd note in 256th of a msec */ 57 EAS_I32 restTicks; /* ticks to rest after current note */ 58 EAS_I32 repeatOffset; /* file offset to start of repeat section */ 59 EAS_U8 repeatCount; /* repeat counter */ 60 EAS_I8 dataByte; /* storage for characters that are "put back" */ 61 EAS_U8 state; /* current state EAS_STATE_XXXX */ 62 EAS_I8 style; /* from STYLE */ 63 EAS_U8 note; /* MIDI note number */ 64 EAS_U8 octave; /* decault octave prefix */ 65 EAS_I8 duration; /* default note duration */ 66} S_RTTTL_DATA; 67 68#endif 69 70 71