eas_rtttldata.h revision 7df30109963092559d3760c0661a020f9daf1030
17df30109963092559d3760c0661a020f9daf1030The Android Open Source Project/*---------------------------------------------------------------------------- 27df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 37df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * File: 47df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * eas_rtttldata.h 57df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 67df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Contents and purpose: 77df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * SMF File Parser 87df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 97df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * This file contains data declarations for the RTTTL parser. 107df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 117df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 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. 247df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 257df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *---------------------------------------------------------------------------- 267df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Revision Control: 277df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * $Revision: 82 $ 287df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $ 297df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *---------------------------------------------------------------------------- 307df30109963092559d3760c0661a020f9daf1030The Android Open Source Project*/ 317df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 327df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#ifndef EAS_RTTTLDATA_H 337df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#define EAS_RTTTLDATA_H 347df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 357df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#include "eas_data.h" 367df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 377df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 387df30109963092559d3760c0661a020f9daf1030The Android Open Source Project/* maximum line size as specified in iMelody V1.2 spec */ 397df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#define MAX_LINE_SIZE 75 407df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 417df30109963092559d3760c0661a020f9daf1030The Android Open Source Project/*---------------------------------------------------------------------------- 427df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 437df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * S_RTTTL_DATA 447df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 457df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * This structure contains the state data for the iMelody parser 467df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *---------------------------------------------------------------------------- 477df30109963092559d3760c0661a020f9daf1030The Android Open Source Project*/ 487df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 497df30109963092559d3760c0661a020f9daf1030The Android Open Source Projecttypedef struct 507df30109963092559d3760c0661a020f9daf1030The Android Open Source Project{ 517df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_FILE_HANDLE fileHandle; /* file handle */ 527df30109963092559d3760c0661a020f9daf1030The Android Open Source Project S_SYNTH *pSynth; /* synthesizer handle */ 537df30109963092559d3760c0661a020f9daf1030The Android Open Source Project S_METADATA_CB metadata; /* metadata callback */ 547df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I32 fileOffset; /* offset to start of data */ 557df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I32 time; /* current time in 256ths of a msec */ 567df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I32 tick; /* length of 32nd note in 256th of a msec */ 577df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I32 restTicks; /* ticks to rest after current note */ 587df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I32 repeatOffset; /* file offset to start of repeat section */ 597df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_U8 repeatCount; /* repeat counter */ 607df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I8 dataByte; /* storage for characters that are "put back" */ 617df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_U8 state; /* current state EAS_STATE_XXXX */ 627df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I8 style; /* from STYLE */ 637df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_U8 note; /* MIDI note number */ 647df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_U8 octave; /* decault octave prefix */ 657df30109963092559d3760c0661a020f9daf1030The Android Open Source Project EAS_I8 duration; /* default note duration */ 667df30109963092559d3760c0661a020f9daf1030The Android Open Source Project} S_RTTTL_DATA; 677df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 687df30109963092559d3760c0661a020f9daf1030The Android Open Source Project#endif 697df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 707df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 71