X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2Fopenal_wrapper.cpp;h=4dddfd59df1d7c72f14b5e6c0cf1222fbd86a7b9;hb=85f9eeb8f438d6d542c0c7b7446b31585cc9c23d;hp=cc4d45fc126fd07d03ff0e1d2c201ba2b41ada3b;hpb=afdad50be70181e79ca8a7f6e78c536d663155e3;p=lugaru.git diff --git a/Source/openal_wrapper.cpp b/Source/openal_wrapper.cpp index cc4d45f..4dddfd5 100644 --- a/Source/openal_wrapper.cpp +++ b/Source/openal_wrapper.cpp @@ -114,14 +114,6 @@ typedef struct OPENAL_SAMPLE int is2d; } OPENAL_SAMPLE; -typedef struct OPENAL_STREAM -{ - char *name; - ALuint bid; // buffer id. - int mode; - int is2d; -} OPENAL_STREAM; - static size_t num_channels = 0; static OPENAL_Channels *channels = NULL; static bool initialized = false; @@ -509,26 +501,6 @@ AL_API signed char OPENAL_Sample_SetMode(OPENAL_SAMPLE *sptr, unsigned int mode) return true; } -AL_API signed char OPENAL_Sample_SetMinMaxDistance(OPENAL_SAMPLE *sptr, float mindist, float maxdist) -{ - if (!initialized) return false; - if (sptr == NULL) return false; - // we ignore maxdist. It's not really important to this game, and the - // FMOD docs suggest that it's worthless anyhow. - - // recalc sources to see if we need to adjust attenuation. - for (int i = 0; i < num_channels; i++) - { - if (channels[i].sample == sptr) - { - const float *p = channels[i].position; - set_channel_position(i, p[0], p[1], p[2]); - } - } - - return 0; -} - AL_API signed char OPENAL_SetFrequency(int channel, int freq) { if (!initialized) return false; @@ -620,11 +592,6 @@ AL_API signed char OPENAL_StopSound(int channel) return true; } -AL_API OPENAL_STREAM *OPENAL_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length) -{ - return (OPENAL_STREAM *) OPENAL_Sample_Load(OPENAL_FREE, name_or_data, mode, offset, length); -} - AL_API void OPENAL_Stream_Close(OPENAL_STREAM *stream) { OPENAL_Sample_Free((OPENAL_SAMPLE *) stream);