style cleanup
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -56,8 +56,8 @@ typedef struct
|
||||
typedef void AUD_Handle;
|
||||
typedef void AUD_Device;
|
||||
typedef void AUD_SEntry;
|
||||
typedef float (*AUD_volumeFunction)(void*, void*, float);
|
||||
typedef void (*AUD_syncFunction)(void*, int, float);
|
||||
typedef float (*AUD_volumeFunction)(void *, void *, float);
|
||||
typedef void (*AUD_syncFunction)(void *, int, float);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -94,14 +94,14 @@ extern void AUD_unlock(void);
|
||||
* \param sound The sound to get the info about.
|
||||
* \return The AUD_SoundInfo structure with filled in data.
|
||||
*/
|
||||
extern AUD_SoundInfo AUD_getInfo(AUD_Sound* sound);
|
||||
extern AUD_SoundInfo AUD_getInfo(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Loads a sound file.
|
||||
* \param filename The filename of the sound file.
|
||||
* \return A handle of the sound file.
|
||||
*/
|
||||
extern AUD_Sound* AUD_load(const char* filename);
|
||||
extern AUD_Sound *AUD_load(const char *filename);
|
||||
|
||||
/**
|
||||
* Loads a sound file.
|
||||
@@ -109,21 +109,21 @@ extern AUD_Sound* AUD_load(const char* filename);
|
||||
* \param size The size of the buffer.
|
||||
* \return A handle of the sound file.
|
||||
*/
|
||||
extern AUD_Sound* AUD_loadBuffer(unsigned char* buffer, int size);
|
||||
extern AUD_Sound *AUD_loadBuffer(unsigned char *buffer, int size);
|
||||
|
||||
/**
|
||||
* Buffers a sound.
|
||||
* \param sound The sound to buffer.
|
||||
* \return A handle of the sound buffer.
|
||||
*/
|
||||
extern AUD_Sound* AUD_bufferSound(AUD_Sound* sound);
|
||||
extern AUD_Sound *AUD_bufferSound(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Rechannels the sound to be mono.
|
||||
* \param sound The sound to rechannel.
|
||||
* \return The mono sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_monoSound(AUD_Sound* sound);
|
||||
extern AUD_Sound *AUD_monoSound(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Delays a sound.
|
||||
@@ -131,7 +131,7 @@ extern AUD_Sound* AUD_monoSound(AUD_Sound* sound);
|
||||
* \param delay The delay in seconds.
|
||||
* \return A handle of the delayed sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay);
|
||||
extern AUD_Sound *AUD_delaySound(AUD_Sound *sound, float delay);
|
||||
|
||||
/**
|
||||
* Limits a sound.
|
||||
@@ -140,21 +140,21 @@ extern AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay);
|
||||
* \param end The stop time in seconds.
|
||||
* \return A handle of the limited sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end);
|
||||
extern AUD_Sound *AUD_limitSound(AUD_Sound *sound, float start, float end);
|
||||
|
||||
/**
|
||||
* Ping pongs a sound.
|
||||
* \param sound The sound to ping pong.
|
||||
* \return A handle of the ping pong sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_pingpongSound(AUD_Sound* sound);
|
||||
extern AUD_Sound *AUD_pingpongSound(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Loops a sound.
|
||||
* \param sound The sound to loop.
|
||||
* \return A handle of the looped sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_loopSound(AUD_Sound* sound);
|
||||
extern AUD_Sound *AUD_loopSound(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Sets a remaining loop count of a looping sound that currently plays.
|
||||
@@ -162,20 +162,20 @@ extern AUD_Sound* AUD_loopSound(AUD_Sound* sound);
|
||||
* \param loops The count of remaining loops, -1 for infinity.
|
||||
* \return Whether the handle is valid.
|
||||
*/
|
||||
extern int AUD_setLoop(AUD_Handle* handle, int loops);
|
||||
extern int AUD_setLoop(AUD_Handle *handle, int loops);
|
||||
|
||||
/**
|
||||
* Rectifies a sound.
|
||||
* \param sound The sound to rectify.
|
||||
* \return A handle of the rectified sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_rectifySound(AUD_Sound* sound);
|
||||
extern AUD_Sound *AUD_rectifySound(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Unloads a sound of any type.
|
||||
* \param sound The handle of the sound.
|
||||
*/
|
||||
extern void AUD_unload(AUD_Sound* sound);
|
||||
extern void AUD_unload(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Plays back a sound file.
|
||||
@@ -184,28 +184,28 @@ extern void AUD_unload(AUD_Sound* sound);
|
||||
* paused when its end has been reached.
|
||||
* \return A handle to the played back sound.
|
||||
*/
|
||||
extern AUD_Handle* AUD_play(AUD_Sound* sound, int keep);
|
||||
extern AUD_Handle *AUD_play(AUD_Sound *sound, int keep);
|
||||
|
||||
/**
|
||||
* Pauses a played back sound.
|
||||
* \param handle The handle to the sound.
|
||||
* \return Whether the handle has been playing or not.
|
||||
*/
|
||||
extern int AUD_pause(AUD_Handle* handle);
|
||||
extern int AUD_pause(AUD_Handle *handle);
|
||||
|
||||
/**
|
||||
* Resumes a paused sound.
|
||||
* \param handle The handle to the sound.
|
||||
* \return Whether the handle has been paused or not.
|
||||
*/
|
||||
extern int AUD_resume(AUD_Handle* handle);
|
||||
extern int AUD_resume(AUD_Handle *handle);
|
||||
|
||||
/**
|
||||
* Stops a playing or paused sound.
|
||||
* \param handle The handle to the sound.
|
||||
* \return Whether the handle has been valid or not.
|
||||
*/
|
||||
extern int AUD_stop(AUD_Handle* handle);
|
||||
extern int AUD_stop(AUD_Handle *handle);
|
||||
|
||||
/**
|
||||
* Sets the end behaviour of a playing or paused sound.
|
||||
@@ -214,7 +214,7 @@ extern int AUD_stop(AUD_Handle* handle);
|
||||
* paused when its end has been reached.
|
||||
* \return Whether the handle has been valid or not.
|
||||
*/
|
||||
extern int AUD_setKeep(AUD_Handle* handle, int keep);
|
||||
extern int AUD_setKeep(AUD_Handle *handle, int keep);
|
||||
|
||||
/**
|
||||
* Seeks a playing or paused sound.
|
||||
@@ -222,7 +222,7 @@ extern int AUD_setKeep(AUD_Handle* handle, int keep);
|
||||
* \param seekTo From where the sound file should be played back in seconds.
|
||||
* \return Whether the handle has been valid or not.
|
||||
*/
|
||||
extern int AUD_seek(AUD_Handle* handle, float seekTo);
|
||||
extern int AUD_seek(AUD_Handle *handle, float seekTo);
|
||||
|
||||
/**
|
||||
* Retrieves the playback position of a handle.
|
||||
@@ -230,32 +230,32 @@ extern int AUD_seek(AUD_Handle* handle, float seekTo);
|
||||
* \return The current playback position in seconds or 0.0 if the handle is
|
||||
* invalid.
|
||||
*/
|
||||
extern float AUD_getPosition(AUD_Handle* handle);
|
||||
extern float AUD_getPosition(AUD_Handle *handle);
|
||||
|
||||
/**
|
||||
* Returns the status of a playing, paused or stopped sound.
|
||||
* \param handle The handle to the sound.
|
||||
* \return The status of the sound behind the handle.
|
||||
*/
|
||||
extern AUD_Status AUD_getStatus(AUD_Handle* handle);
|
||||
extern AUD_Status AUD_getStatus(AUD_Handle *handle);
|
||||
|
||||
/**
|
||||
* Sets the listener location.
|
||||
* \param location The new location.
|
||||
*/
|
||||
extern int AUD_setListenerLocation(const float* location);
|
||||
extern int AUD_setListenerLocation(const float location[3]);
|
||||
|
||||
/**
|
||||
* Sets the listener velocity.
|
||||
* \param velocity The new velocity.
|
||||
*/
|
||||
extern int AUD_setListenerVelocity(const float* velocity);
|
||||
extern int AUD_setListenerVelocity(const float velocity[3]);
|
||||
|
||||
/**
|
||||
* Sets the listener orientation.
|
||||
* \param orientation The new orientation as quaternion.
|
||||
*/
|
||||
extern int AUD_setListenerOrientation(const float* orientation);
|
||||
extern int AUD_setListenerOrientation(const float orientation[4]);
|
||||
|
||||
/**
|
||||
* Sets the speed of sound.
|
||||
@@ -284,7 +284,7 @@ extern int AUD_setDistanceModel(AUD_DistanceModel model);
|
||||
* \param location The new location.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setSourceLocation(AUD_Handle* handle, const float* location);
|
||||
extern int AUD_setSourceLocation(AUD_Handle *handle, const float location[3]);
|
||||
|
||||
/**
|
||||
* Sets the velocity of a source.
|
||||
@@ -292,7 +292,7 @@ extern int AUD_setSourceLocation(AUD_Handle* handle, const float* location);
|
||||
* \param velocity The new velocity.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setSourceVelocity(AUD_Handle* handle, const float* velocity);
|
||||
extern int AUD_setSourceVelocity(AUD_Handle *handle, const float velocity[3]);
|
||||
|
||||
/**
|
||||
* Sets the orientation of a source.
|
||||
@@ -300,7 +300,7 @@ extern int AUD_setSourceVelocity(AUD_Handle* handle, const float* velocity);
|
||||
* \param orientation The new orientation as quaternion.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setSourceOrientation(AUD_Handle* handle, const float* orientation);
|
||||
extern int AUD_setSourceOrientation(AUD_Handle *handle, const float orientation[4]);
|
||||
|
||||
/**
|
||||
* Sets whether the source location, velocity and orientation are relative
|
||||
@@ -309,7 +309,7 @@ extern int AUD_setSourceOrientation(AUD_Handle* handle, const float* orientation
|
||||
* \param relative Whether the source is relative.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setRelative(AUD_Handle* handle, int relative);
|
||||
extern int AUD_setRelative(AUD_Handle *handle, int relative);
|
||||
|
||||
/**
|
||||
* Sets the maximum volume of a source.
|
||||
@@ -317,7 +317,7 @@ extern int AUD_setRelative(AUD_Handle* handle, int relative);
|
||||
* \param volume The new maximum volume.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setVolumeMaximum(AUD_Handle* handle, float volume);
|
||||
extern int AUD_setVolumeMaximum(AUD_Handle *handle, float volume);
|
||||
|
||||
/**
|
||||
* Sets the minimum volume of a source.
|
||||
@@ -325,7 +325,7 @@ extern int AUD_setVolumeMaximum(AUD_Handle* handle, float volume);
|
||||
* \param volume The new minimum volume.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setVolumeMinimum(AUD_Handle* handle, float volume);
|
||||
extern int AUD_setVolumeMinimum(AUD_Handle *handle, float volume);
|
||||
|
||||
/**
|
||||
* Sets the maximum distance of a source.
|
||||
@@ -335,7 +335,7 @@ extern int AUD_setVolumeMinimum(AUD_Handle* handle, float volume);
|
||||
* \param distance The new maximum distance.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setDistanceMaximum(AUD_Handle* handle, float distance);
|
||||
extern int AUD_setDistanceMaximum(AUD_Handle *handle, float distance);
|
||||
|
||||
/**
|
||||
* Sets the reference distance of a source.
|
||||
@@ -343,7 +343,7 @@ extern int AUD_setDistanceMaximum(AUD_Handle* handle, float distance);
|
||||
* \param distance The new reference distance.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setDistanceReference(AUD_Handle* handle, float distance);
|
||||
extern int AUD_setDistanceReference(AUD_Handle *handle, float distance);
|
||||
|
||||
/**
|
||||
* Sets the attenuation of a source.
|
||||
@@ -352,7 +352,7 @@ extern int AUD_setDistanceReference(AUD_Handle* handle, float distance);
|
||||
* \param factor The new attenuation.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setAttenuation(AUD_Handle* handle, float factor);
|
||||
extern int AUD_setAttenuation(AUD_Handle *handle, float factor);
|
||||
|
||||
/**
|
||||
* Sets the outer angle of the cone of a source.
|
||||
@@ -360,7 +360,7 @@ extern int AUD_setAttenuation(AUD_Handle* handle, float factor);
|
||||
* \param angle The new outer angle of the cone.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setConeAngleOuter(AUD_Handle* handle, float angle);
|
||||
extern int AUD_setConeAngleOuter(AUD_Handle *handle, float angle);
|
||||
|
||||
/**
|
||||
* Sets the inner angle of the cone of a source.
|
||||
@@ -368,7 +368,7 @@ extern int AUD_setConeAngleOuter(AUD_Handle* handle, float angle);
|
||||
* \param angle The new inner angle of the cone.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setConeAngleInner(AUD_Handle* handle, float angle);
|
||||
extern int AUD_setConeAngleInner(AUD_Handle *handle, float angle);
|
||||
|
||||
/**
|
||||
* Sets the outer volume of the cone of a source.
|
||||
@@ -378,7 +378,7 @@ extern int AUD_setConeAngleInner(AUD_Handle* handle, float angle);
|
||||
* \param volume The new outer volume of the cone.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setConeVolumeOuter(AUD_Handle* handle, float volume);
|
||||
extern int AUD_setConeVolumeOuter(AUD_Handle *handle, float volume);
|
||||
|
||||
/**
|
||||
* Sets the volume of a played back sound.
|
||||
@@ -386,7 +386,7 @@ extern int AUD_setConeVolumeOuter(AUD_Handle* handle, float volume);
|
||||
* \param volume The new volume, must be between 0.0 and 1.0.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setSoundVolume(AUD_Handle* handle, float volume);
|
||||
extern int AUD_setSoundVolume(AUD_Handle *handle, float volume);
|
||||
|
||||
/**
|
||||
* Sets the pitch of a played back sound.
|
||||
@@ -394,14 +394,14 @@ extern int AUD_setSoundVolume(AUD_Handle* handle, float volume);
|
||||
* \param pitch The new pitch.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setSoundPitch(AUD_Handle* handle, float pitch);
|
||||
extern int AUD_setSoundPitch(AUD_Handle *handle, float pitch);
|
||||
|
||||
/**
|
||||
* Opens a read device, with which audio data can be read.
|
||||
* \param specs The specification of the audio data.
|
||||
* \return A device handle.
|
||||
*/
|
||||
extern AUD_Device* AUD_openReadDevice(AUD_DeviceSpecs specs);
|
||||
extern AUD_Device *AUD_openReadDevice(AUD_DeviceSpecs specs);
|
||||
|
||||
/**
|
||||
* Sets the main volume of a device.
|
||||
@@ -409,7 +409,7 @@ extern AUD_Device* AUD_openReadDevice(AUD_DeviceSpecs specs);
|
||||
* \param volume The new volume, must be between 0.0 and 1.0.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern int AUD_setDeviceVolume(AUD_Device* device, float volume);
|
||||
extern int AUD_setDeviceVolume(AUD_Device *device, float volume);
|
||||
|
||||
/**
|
||||
* Plays back a sound file through a read device.
|
||||
@@ -418,7 +418,7 @@ extern int AUD_setDeviceVolume(AUD_Device* device, float volume);
|
||||
* \param seek The position where the sound should be seeked to.
|
||||
* \return A handle to the played back sound.
|
||||
*/
|
||||
extern AUD_Handle* AUD_playDevice(AUD_Device* device, AUD_Sound* sound, float seek);
|
||||
extern AUD_Handle *AUD_playDevice(AUD_Device *device, AUD_Sound *sound, float seek);
|
||||
|
||||
/**
|
||||
* Reads the next samples into the supplied buffer.
|
||||
@@ -429,23 +429,23 @@ extern AUD_Handle* AUD_playDevice(AUD_Device* device, AUD_Sound* sound, float se
|
||||
* played back currently, in that case the buffer is filled with
|
||||
* silence.
|
||||
*/
|
||||
extern int AUD_readDevice(AUD_Device* device, data_t* buffer, int length);
|
||||
extern int AUD_readDevice(AUD_Device *device, data_t *buffer, int length);
|
||||
|
||||
/**
|
||||
* Closes a read device.
|
||||
* \param device The read device.
|
||||
*/
|
||||
extern void AUD_closeReadDevice(AUD_Device* device);
|
||||
extern void AUD_closeReadDevice(AUD_Device *device);
|
||||
|
||||
/**
|
||||
* Reads a sound file into a newly created float buffer.
|
||||
* The sound is therefore bandpassed, rectified and resampled.
|
||||
*/
|
||||
extern float* AUD_readSoundBuffer(const char* filename, float low, float high,
|
||||
extern float *AUD_readSoundBuffer(const char *filename, float low, float high,
|
||||
float attack, float release, float threshold,
|
||||
int accumulate, int additive, int square,
|
||||
float sthreshold, double samplerate,
|
||||
int* length);
|
||||
int *length);
|
||||
|
||||
/**
|
||||
* Pauses a playing sound after a specific amount of time.
|
||||
@@ -453,7 +453,7 @@ extern float* AUD_readSoundBuffer(const char* filename, float low, float high,
|
||||
* \param seconds The time in seconds.
|
||||
* \return The silence handle.
|
||||
*/
|
||||
extern AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds);
|
||||
extern AUD_Handle *AUD_pauseAfter(AUD_Handle *handle, float seconds);
|
||||
|
||||
/**
|
||||
* Creates a new sequenced sound scene.
|
||||
@@ -461,27 +461,27 @@ extern AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds);
|
||||
* \param muted Whether the scene is muted.
|
||||
* \return The new sound scene.
|
||||
*/
|
||||
extern AUD_Sound* AUD_createSequencer(float fps, int muted);
|
||||
extern AUD_Sound *AUD_createSequencer(float fps, int muted);
|
||||
|
||||
/**
|
||||
* Deletes a sound scene.
|
||||
* \param sequencer The sound scene.
|
||||
*/
|
||||
extern void AUD_destroySequencer(AUD_Sound* sequencer);
|
||||
extern void AUD_destroySequencer(AUD_Sound *sequencer);
|
||||
|
||||
/**
|
||||
* Sets the muting state of the scene.
|
||||
* \param sequencer The sound scene.
|
||||
* \param muted Whether the scene is muted.
|
||||
*/
|
||||
extern void AUD_setSequencerMuted(AUD_Sound* sequencer, int muted);
|
||||
extern void AUD_setSequencerMuted(AUD_Sound *sequencer, int muted);
|
||||
|
||||
/**
|
||||
* Sets the scene's FPS.
|
||||
* \param sequencer The sound scene.
|
||||
* \param fps The new FPS.
|
||||
*/
|
||||
extern void AUD_setSequencerFPS(AUD_Sound* sequencer, float fps);
|
||||
extern void AUD_setSequencerFPS(AUD_Sound *sequencer, float fps);
|
||||
|
||||
/**
|
||||
* Adds a new entry to the scene.
|
||||
@@ -492,7 +492,7 @@ extern void AUD_setSequencerFPS(AUD_Sound* sequencer, float fps);
|
||||
* \param skip How much seconds should be skipped at the beginning.
|
||||
* \return The entry added.
|
||||
*/
|
||||
extern AUD_SEntry* AUD_addSequence(AUD_Sound* sequencer, AUD_Sound* sound,
|
||||
extern AUD_SEntry *AUD_addSequence(AUD_Sound *sequencer, AUD_Sound *sound,
|
||||
float begin, float end, float skip);
|
||||
|
||||
/**
|
||||
@@ -500,7 +500,7 @@ extern AUD_SEntry* AUD_addSequence(AUD_Sound* sequencer, AUD_Sound* sound,
|
||||
* \param sequencer The sound scene.
|
||||
* \param entry The entry to remove.
|
||||
*/
|
||||
extern void AUD_removeSequence(AUD_Sound* sequencer, AUD_SEntry* entry);
|
||||
extern void AUD_removeSequence(AUD_Sound *sequencer, AUD_SEntry *entry);
|
||||
|
||||
/**
|
||||
* Moves the entry.
|
||||
@@ -509,14 +509,14 @@ extern void AUD_removeSequence(AUD_Sound* sequencer, AUD_SEntry* entry);
|
||||
* \param end The new end time or a negative value if unknown.
|
||||
* \param skip How many seconds to skip at the beginning.
|
||||
*/
|
||||
extern void AUD_moveSequence(AUD_SEntry* entry, float begin, float end, float skip);
|
||||
extern void AUD_moveSequence(AUD_SEntry *entry, float begin, float end, float skip);
|
||||
|
||||
/**
|
||||
* Sets the muting state of the entry.
|
||||
* \param entry The sequenced entry.
|
||||
* \param mute Whether the entry should be muted or not.
|
||||
*/
|
||||
extern void AUD_muteSequence(AUD_SEntry* entry, char mute);
|
||||
extern void AUD_muteSequence(AUD_SEntry *entry, char mute);
|
||||
|
||||
/**
|
||||
* Sets whether the entrie's location, velocity and orientation are relative
|
||||
@@ -525,14 +525,14 @@ extern void AUD_muteSequence(AUD_SEntry* entry, char mute);
|
||||
* \param relative Whether the source is relative.
|
||||
* \return Whether the action succeeded.
|
||||
*/
|
||||
extern void AUD_setRelativeSequence(AUD_SEntry* entry, char relative);
|
||||
extern void AUD_setRelativeSequence(AUD_SEntry *entry, char relative);
|
||||
|
||||
/**
|
||||
* Sets the sound of the entry.
|
||||
* \param entry The sequenced entry.
|
||||
* \param sound The new sound.
|
||||
*/
|
||||
extern void AUD_updateSequenceSound(AUD_SEntry* entry, AUD_Sound* sound);
|
||||
extern void AUD_updateSequenceSound(AUD_SEntry *entry, AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Writes animation data to a sequenced entry.
|
||||
@@ -542,7 +542,7 @@ extern void AUD_updateSequenceSound(AUD_SEntry* entry, AUD_Sound* sound);
|
||||
* \param data The data to write.
|
||||
* \param animated Whether the attribute is animated.
|
||||
*/
|
||||
extern void AUD_setSequenceAnimData(AUD_SEntry* entry, AUD_AnimateablePropertyType type, int frame, float* data, char animated);
|
||||
extern void AUD_setSequenceAnimData(AUD_SEntry *entry, AUD_AnimateablePropertyType type, int frame, float *data, char animated);
|
||||
|
||||
/**
|
||||
* Writes animation data to a sequenced entry.
|
||||
@@ -552,7 +552,7 @@ extern void AUD_setSequenceAnimData(AUD_SEntry* entry, AUD_AnimateablePropertyTy
|
||||
* \param data The data to write.
|
||||
* \param animated Whether the attribute is animated.
|
||||
*/
|
||||
extern void AUD_setSequencerAnimData(AUD_Sound* sequencer, AUD_AnimateablePropertyType type, int frame, float* data, char animated);
|
||||
extern void AUD_setSequencerAnimData(AUD_Sound *sequencer, AUD_AnimateablePropertyType type, int frame, float *data, char animated);
|
||||
|
||||
/**
|
||||
* Updates all non-animated parameters of the entry.
|
||||
@@ -566,7 +566,7 @@ extern void AUD_setSequencerAnimData(AUD_Sound* sequencer, AUD_AnimateableProper
|
||||
* \param cone_angle_inner The inner cone opening angle.
|
||||
* \param cone_volume_outer The volume outside the outer cone.
|
||||
*/
|
||||
extern void AUD_updateSequenceData(AUD_SEntry* entry, float volume_max, float volume_min,
|
||||
extern void AUD_updateSequenceData(AUD_SEntry *entry, float volume_max, float volume_min,
|
||||
float distance_max, float distance_reference, float attenuation,
|
||||
float cone_angle_outer, float cone_angle_inner, float cone_volume_outer);
|
||||
|
||||
@@ -577,7 +577,7 @@ extern void AUD_updateSequenceData(AUD_SEntry* entry, float volume_max, float vo
|
||||
* \param factor The doppler factor to control the effect's strength.
|
||||
* \param model The distance model for distance calculation.
|
||||
*/
|
||||
extern void AUD_updateSequencerData(AUD_Sound* sequencer, float speed_of_sound,
|
||||
extern void AUD_updateSequencerData(AUD_Sound *sequencer, float speed_of_sound,
|
||||
float factor, AUD_DistanceModel model);
|
||||
|
||||
/**
|
||||
@@ -585,28 +585,28 @@ extern void AUD_updateSequencerData(AUD_Sound* sequencer, float speed_of_sound,
|
||||
* current playback device.
|
||||
* \param sequencer The sound scene.
|
||||
*/
|
||||
extern void AUD_setSequencerDeviceSpecs(AUD_Sound* sequencer);
|
||||
extern void AUD_setSequencerDeviceSpecs(AUD_Sound *sequencer);
|
||||
|
||||
/**
|
||||
* Sets the audio output specification of the sound scene.
|
||||
* \param sequencer The sound scene.
|
||||
* \param specs The new specification.
|
||||
*/
|
||||
extern void AUD_setSequencerSpecs(AUD_Sound* sequencer, AUD_Specs specs);
|
||||
extern void AUD_setSequencerSpecs(AUD_Sound *sequencer, AUD_Specs specs);
|
||||
|
||||
/**
|
||||
* Seeks sequenced sound scene playback.
|
||||
* \param handle Playback handle.
|
||||
* \param time Time in seconds to seek to.
|
||||
*/
|
||||
extern void AUD_seekSequencer(AUD_Handle* handle, float time);
|
||||
extern void AUD_seekSequencer(AUD_Handle *handle, float time);
|
||||
|
||||
/**
|
||||
* Returns the current sound scene playback time.
|
||||
* \param handle Playback handle.
|
||||
* \return The playback time in seconds.
|
||||
*/
|
||||
extern float AUD_getSequencerPosition(AUD_Handle* handle);
|
||||
extern float AUD_getSequencerPosition(AUD_Handle *handle);
|
||||
|
||||
/**
|
||||
* Starts the playback of jack transport if possible.
|
||||
@@ -624,7 +624,7 @@ extern void AUD_stopPlayback(void);
|
||||
* \param function The callback function.
|
||||
* \param data The data parameter for the callback.
|
||||
*/
|
||||
extern void AUD_setSyncCallback(AUD_syncFunction function, void* data);
|
||||
extern void AUD_setSyncCallback(AUD_syncFunction function, void *data);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -641,32 +641,32 @@ extern int AUD_doesPlayback(void);
|
||||
* \param samples_per_second How many samples to read per second of the sound.
|
||||
* \return How many samples really have been read. Always <= length.
|
||||
*/
|
||||
extern int AUD_readSound(AUD_Sound* sound, sample_t* buffer, int length, int samples_per_second);
|
||||
extern int AUD_readSound(AUD_Sound *sound, sample_t *buffer, int length, int samples_per_second);
|
||||
|
||||
/**
|
||||
* Copies a sound.
|
||||
* \param sound Sound to copy.
|
||||
* \return Copied sound.
|
||||
*/
|
||||
extern AUD_Sound* AUD_copy(AUD_Sound* sound);
|
||||
extern AUD_Sound *AUD_copy(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Frees a handle.
|
||||
* \param channel Handle to free.
|
||||
*/
|
||||
extern void AUD_freeHandle(AUD_Handle* channel);
|
||||
extern void AUD_freeHandle(AUD_Handle *channel);
|
||||
|
||||
/**
|
||||
* Creates a new set.
|
||||
* \return The new set.
|
||||
*/
|
||||
extern void* AUD_createSet(void);
|
||||
extern void *AUD_createSet(void);
|
||||
|
||||
/**
|
||||
* Deletes a set.
|
||||
* \param set The set to delete.
|
||||
*/
|
||||
extern void AUD_destroySet(void* set);
|
||||
extern void AUD_destroySet(void *set);
|
||||
|
||||
/**
|
||||
* Removes an entry from a set.
|
||||
@@ -674,21 +674,21 @@ extern void AUD_destroySet(void* set);
|
||||
* \param entry The entry to remove.
|
||||
* \return Whether the entry was in the set or not.
|
||||
*/
|
||||
extern char AUD_removeSet(void* set, void* entry);
|
||||
extern char AUD_removeSet(void *set, void *entry);
|
||||
|
||||
/**
|
||||
* Adds a new entry to a set.
|
||||
* \param set The set work on.
|
||||
* \param entry The entry to add.
|
||||
*/
|
||||
extern void AUD_addSet(void* set, void* entry);
|
||||
extern void AUD_addSet(void *set, void *entry);
|
||||
|
||||
/**
|
||||
* Removes one entry from a set and returns it.
|
||||
* \param set The set work on.
|
||||
* \return The entry or NULL if the set is empty.
|
||||
*/
|
||||
extern void* AUD_getSet(void* set);
|
||||
extern void *AUD_getSet(void *set);
|
||||
|
||||
/**
|
||||
* Mixes a sound down into a file.
|
||||
@@ -703,7 +703,10 @@ extern void* AUD_getSet(void* set);
|
||||
* \param bitrate The bitrate for encoding.
|
||||
* \return An error message or NULL in case of success.
|
||||
*/
|
||||
extern const char* AUD_mixdown(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate);
|
||||
extern const char *AUD_mixdown(AUD_Sound *sound, unsigned int start, unsigned int length,
|
||||
unsigned int buffersize, const char *filename,
|
||||
AUD_DeviceSpecs specs, AUD_Container format,
|
||||
AUD_Codec codec, unsigned int bitrate);
|
||||
|
||||
/**
|
||||
* Mixes a sound down into multiple files.
|
||||
@@ -718,7 +721,10 @@ extern const char* AUD_mixdown(AUD_Sound* sound, unsigned int start, unsigned in
|
||||
* \param bitrate The bitrate for encoding.
|
||||
* \return An error message or NULL in case of success.
|
||||
*/
|
||||
extern const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate);
|
||||
extern const char *AUD_mixdown_per_channel(AUD_Sound *sound, unsigned int start, unsigned int length,
|
||||
unsigned int buffersize, const char *filename,
|
||||
AUD_DeviceSpecs specs, AUD_Container format,
|
||||
AUD_Codec codec, unsigned int bitrate);
|
||||
|
||||
/**
|
||||
* Opens a read device and prepares it for mixdown of the sound scene.
|
||||
@@ -728,7 +734,7 @@ extern const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start,
|
||||
* \param start The start time of the mixdown in the sound scene.
|
||||
* \return The read device for the mixdown.
|
||||
*/
|
||||
extern AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start);
|
||||
extern AUD_Device *AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound *sequencer, float volume, float start);
|
||||
|
||||
#ifdef WITH_PYTHON
|
||||
/**
|
||||
@@ -736,14 +742,14 @@ extern AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* seque
|
||||
* \param sound The sound factory.
|
||||
* \return The python factory.
|
||||
*/
|
||||
extern void* AUD_getPythonFactory(AUD_Sound* sound);
|
||||
extern void *AUD_getPythonFactory(AUD_Sound *sound);
|
||||
|
||||
/**
|
||||
* Retrieves the sound factory of a python factory.
|
||||
* \param sound The python factory.
|
||||
* \return The sound factory.
|
||||
*/
|
||||
extern AUD_Sound* AUD_getPythonSound(void* sound);
|
||||
extern AUD_Sound *AUD_getPythonSound(void *sound);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -763,7 +769,7 @@ AUD_Reference<AUD_IDevice> AUD_getDevice();
|
||||
* Returns the current playback 3D device.
|
||||
* \return The playback 3D device.
|
||||
*/
|
||||
AUD_I3DDevice* AUD_get3DDevice();
|
||||
AUD_I3DDevice *AUD_get3DDevice();
|
||||
#endif
|
||||
|
||||
#endif //__AUD_C_API_H__
|
||||
|
@@ -36,7 +36,7 @@ struct OSLGlobals {
|
||||
/* use */
|
||||
bool use;
|
||||
|
||||
/* shading system */
|
||||
/* shading system */
|
||||
OSL::ShadingSystem *ss;
|
||||
OSLRenderServices *services;
|
||||
|
||||
|
@@ -182,7 +182,8 @@ bool OSLRenderServices::get_array_attribute(void *renderstate, bool derivatives,
|
||||
static void set_attribute_float3(float3 f[3], TypeDesc type, bool derivatives, void *val)
|
||||
{
|
||||
if (type == TypeDesc::TypePoint || type == TypeDesc::TypeVector ||
|
||||
type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor) {
|
||||
type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor)
|
||||
{
|
||||
float3 *fval = (float3 *)val;
|
||||
fval[0] = f[0];
|
||||
if (derivatives) {
|
||||
@@ -203,7 +204,8 @@ static void set_attribute_float3(float3 f[3], TypeDesc type, bool derivatives, v
|
||||
static void set_attribute_float(float f[3], TypeDesc type, bool derivatives, void *val)
|
||||
{
|
||||
if (type == TypeDesc::TypePoint || type == TypeDesc::TypeVector ||
|
||||
type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor) {
|
||||
type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor)
|
||||
{
|
||||
float3 *fval = (float3 *)val;
|
||||
fval[0] = make_float3(f[0], f[0], f[0]);
|
||||
if (derivatives) {
|
||||
@@ -232,7 +234,8 @@ static bool get_mesh_attribute(KernelGlobals *kg, const ShaderData *sd, const OS
|
||||
return true;
|
||||
}
|
||||
else if (attr.type == TypeDesc::TypePoint || attr.type == TypeDesc::TypeVector ||
|
||||
attr.type == TypeDesc::TypeNormal || attr.type == TypeDesc::TypeColor) {
|
||||
attr.type == TypeDesc::TypeNormal || attr.type == TypeDesc::TypeColor)
|
||||
{
|
||||
/* todo: this won't work when float3 has w component */
|
||||
float3 fval[3];
|
||||
fval[0] = triangle_attribute_float3(kg, sd, attr.elem, attr.offset,
|
||||
@@ -419,15 +422,16 @@ bool OSLRenderServices::has_userdata(ustring name, TypeDesc type, void *renderst
|
||||
}
|
||||
|
||||
int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 ¢er,
|
||||
float radius, int max_points, bool sort, size_t *out_indices, float *out_distances, int derivs_offset)
|
||||
float radius, int max_points, bool sort,
|
||||
size_t *out_indices, float *out_distances, int derivs_offset)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int OSLRenderServices::pointcloud_get(ustring filename, size_t *indices, int count,
|
||||
ustring attr_name, TypeDesc attr_type, void *out_data)
|
||||
ustring attr_name, TypeDesc attr_type, void *out_data)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
@@ -56,22 +56,22 @@ public:
|
||||
bool get_matrix(OSL::Matrix44 &result, OSL::TransformationPtr xform);
|
||||
bool get_matrix(OSL::Matrix44 &result, ustring from);
|
||||
|
||||
bool get_array_attribute(void *renderstate, bool derivatives,
|
||||
bool get_array_attribute(void *renderstate, bool derivatives,
|
||||
ustring object, TypeDesc type, ustring name,
|
||||
int index, void *val);
|
||||
bool get_attribute(void *renderstate, bool derivatives, ustring object,
|
||||
TypeDesc type, ustring name, void *val);
|
||||
|
||||
bool get_userdata(bool derivatives, ustring name, TypeDesc type,
|
||||
bool get_userdata(bool derivatives, ustring name, TypeDesc type,
|
||||
void *renderstate, void *val);
|
||||
bool has_userdata(ustring name, TypeDesc type, void *renderstate);
|
||||
|
||||
|
||||
int pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 ¢er,
|
||||
float radius, int max_points, bool sort, size_t *out_indices,
|
||||
float *out_distances, int derivs_offset);
|
||||
float radius, int max_points, bool sort, size_t *out_indices,
|
||||
float *out_distances, int derivs_offset);
|
||||
|
||||
int pointcloud_get(ustring filename, size_t *indices, int count, ustring attr_name,
|
||||
TypeDesc attr_type, void *out_data);
|
||||
TypeDesc attr_type, void *out_data);
|
||||
|
||||
private:
|
||||
KernelGlobals *kernel_globals;
|
||||
|
Reference in New Issue
Block a user