Lines Matching refs:sound

52 soundDataSize(SWFSound sound)  in soundDataSize()  argument
54 if ((sound->flags&SWF_SOUND_COMPRESSION) == SWF_SOUND_NOT_COMPRESSED || in soundDataSize()
55 (sound->flags&SWF_SOUND_COMPRESSION) == SWF_SOUND_NOT_COMPRESSED_LE) in soundDataSize()
57 int sampleCount = SWFInput_length(sound->input); in soundDataSize()
59 if ((sound->flags & SWF_SOUND_BITS) == SWF_SOUND_16BITS) in soundDataSize()
62 if ((sound->flags & SWF_SOUND_CHANNELS) == SWF_SOUND_STEREO) in soundDataSize()
67 else if ((sound->flags&SWF_SOUND_COMPRESSION) == SWF_SOUND_ADPCM_COMPRESSED) in soundDataSize()
72 SWF_assert((sound->flags & SWF_SOUND_BITS) == SWF_SOUND_16BITS); in soundDataSize()
74 filesize = SWFInput_length(sound->input); in soundDataSize()
76 if ((sound->flags&SWF_SOUND_CHANNELS) == SWF_SOUND_MONO) in soundDataSize()
78 else if ((sound->flags & SWF_SOUND_CHANNELS) == SWF_SOUND_STEREO) in soundDataSize()
97 else if ((sound->flags&SWF_SOUND_COMPRESSION) == SWF_SOUND_MP3_COMPRESSED) in soundDataSize()
99 int pos = SWFInput_tell(sound->input); in soundDataSize()
101 getMP3Samples(sound->input, sound->flags, &samples); in soundDataSize()
102 SWFInput_seek(sound->input, pos, SEEK_SET); in soundDataSize()
117 SWFSound sound = (SWFSound)block; in writeSWFSoundToStream() local
119 methodWriteUInt16(CHARACTERID(sound), method, data); in writeSWFSoundToStream()
120 method(sound->flags, data); in writeSWFSoundToStream()
122 l = SWFInput_length(sound->input); in writeSWFSoundToStream()
124 methodWriteUInt32(soundDataSize(sound), method, data); in writeSWFSoundToStream()
126 if ( (sound->flags & SWF_SOUND_COMPRESSION) == SWF_SOUND_MP3_COMPRESSED ) in writeSWFSoundToStream()
127 methodWriteUInt16(sound->seekSamples, method, data); in writeSWFSoundToStream()
131 method((unsigned char)SWFInput_getChar(sound->input), data); in writeSWFSoundToStream()
138 SWFSound sound = (SWFSound)block; in completeDefineSWFSoundBlock() local
140 if ((sound->flags&SWF_SOUND_COMPRESSION) == SWF_SOUND_MP3_COMPRESSED) in completeDefineSWFSoundBlock()
141 return 7 + 2 + SWFInput_length(sound->input); in completeDefineSWFSoundBlock()
143 return 7 + SWFInput_length(sound->input); in completeDefineSWFSoundBlock()
150 SWFSound sound = (SWFSound)block; in writeSWFSoundWithSoundStreamToStream() local
152 methodWriteUInt16(CHARACTERID(sound), method, data); in writeSWFSoundWithSoundStreamToStream()
153 method(sound->flags, data); in writeSWFSoundWithSoundStreamToStream()
155 writeSWFSoundWithSoundStreamToMethod(sound->soundStream, method, data); in writeSWFSoundWithSoundStreamToStream()
162 SWFSound sound = (SWFSound)block; in completeDefineSWFSoundWithSoundStreamBlock() local
163 int len = SWFSoundStream_getLength(sound->soundStream, 0) + 9; in completeDefineSWFSoundWithSoundStreamBlock()
164 SWFSoundStream_rewind(sound->soundStream); in completeDefineSWFSoundWithSoundStreamBlock()
178 SWFSound_setInitialMp3Delay(SWFSound sound, int delaySeek) in SWFSound_setInitialMp3Delay() argument
180 sound->seekSamples = delaySeek; in SWFSound_setInitialMp3Delay()
185 destroySWFSound(SWFSound sound) in destroySWFSound() argument
187 if (sound->freeInput) in destroySWFSound()
188 destroySWFInput(sound->input); in destroySWFSound()
189 destroySWFCharacter((SWFCharacter) sound); in destroySWFSound()
238 SWFSound sound = (SWFSound)malloc(sizeof(struct SWFSound_s)); in newSWFSound_fromInput() local
239 SWFBlock block = (SWFBlock)sound; in newSWFSound_fromInput()
241 SWFCharacterInit((SWFCharacter)sound); in newSWFSound_fromInput()
243 CHARACTERID(sound) = ++SWF_gNumCharacters; in newSWFSound_fromInput()
251 sound->input = input; in newSWFSound_fromInput()
252 sound->flags = flags; in newSWFSound_fromInput()
253 if((sound->flags&SWF_SOUND_COMPRESSION) == SWF_SOUND_MP3_COMPRESSED) in newSWFSound_fromInput()
255 if(getMP3Flags(input, &sound->flags) < 0) in newSWFSound_fromInput()
257 free(sound); in newSWFSound_fromInput()
261 sound->soundStream = 0; in newSWFSound_fromInput()
262 sound->seekSamples = SWFSOUND_INITIAL_DELAY; in newSWFSound_fromInput()
263 sound->freeInput = FALSE; in newSWFSound_fromInput()
264 return sound; in newSWFSound_fromInput()
275 SWFSound sound = (SWFSound)malloc(sizeof(struct SWFSound_s)); in newSWFSound_fromSoundStream() local
276 SWFBlock block = (SWFBlock)sound; in newSWFSound_fromSoundStream()
278 SWFCharacterInit((SWFCharacter)sound); in newSWFSound_fromSoundStream()
280 CHARACTERID(sound) = ++SWF_gNumCharacters; in newSWFSound_fromSoundStream()
288 sound->freeInput = FALSE; in newSWFSound_fromSoundStream()
289 sound->input = 0; in newSWFSound_fromSoundStream()
290 sound->flags = SWFSoundStream_getFlags(stream); in newSWFSound_fromSoundStream()
291 sound->soundStream = stream; in newSWFSound_fromSoundStream()
293 return sound; in newSWFSound_fromSoundStream()