156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/*----------------------------------------------------------------------------
256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * File:
456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * eas_rtttldata.h
556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Contents and purpose:
756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * SMF File Parser
856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * This file contains data declarations for the RTTTL parser.
1056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
1156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Copyright Sonic Network Inc. 2005
127df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
137df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License");
147df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * you may not use this file except in compliance with the License.
157df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * You may obtain a copy of the License at
167df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
177df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *      http://www.apache.org/licenses/LICENSE-2.0
187df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
197df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Unless required by applicable law or agreed to in writing, software
207df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS,
217df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
227df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * See the License for the specific language governing permissions and
237df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * limitations under the License.
2456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
2556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *----------------------------------------------------------------------------
2656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Revision Control:
2756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *   $Revision: 82 $
2856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *   $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $
2956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *----------------------------------------------------------------------------
3056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks*/
3156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
3256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#ifndef EAS_RTTTLDATA_H
3356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define EAS_RTTTLDATA_H
3456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
3556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#include "eas_data.h"
3656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
3756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
3856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/* maximum line size as specified in iMelody V1.2 spec */
3956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define MAX_LINE_SIZE           75
4056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
4156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/*----------------------------------------------------------------------------
4256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
4356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * S_RTTTL_DATA
4456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
4556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * This structure contains the state data for the iMelody parser
4656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *----------------------------------------------------------------------------
4756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks*/
4856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
4956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparkstypedef struct
5056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks{
5156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_FILE_HANDLE fileHandle;             /* file handle */
5256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    S_SYNTH *pSynth;                    /* synthesizer handle */
5356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    S_METADATA_CB   metadata;               /* metadata callback */
5456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I32     fileOffset;                 /* offset to start of data */
5556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I32     time;                       /* current time in 256ths of a msec */
5656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I32     tick;                       /* length of 32nd note in 256th of a msec */
5756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I32     restTicks;                  /* ticks to rest after current note */
5856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I32     repeatOffset;               /* file offset to start of repeat section */
5956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_U8      repeatCount;                /* repeat counter */
6056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I8      dataByte;                   /* storage for characters that are "put back" */
6156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_U8      state;                      /* current state EAS_STATE_XXXX */
6256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I8      style;                      /* from STYLE */
6356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_U8      note;                       /* MIDI note number */
6456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_U8      octave;                     /* decault octave prefix */
6556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks    EAS_I8      duration;                   /* default note duration */
6656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks} S_RTTTL_DATA;
6756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
6856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#endif
6956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
7056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
71