-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
240fd51
commit df85598
Showing
284 changed files
with
24,653 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
LOCAL_CPP_EXTENSION := .cpp .cc | ||
LOCAL_CPP_FEATURES += exceptions | ||
LOCAL_MODULE := GiroflexVSL | ||
LOCAL_SRC_FILES := main.cpp mod/logger.cpp mod/config.cpp Log.cpp GiroflexVSL.cpp menu/Draw.cpp menu/Menu.cpp menu/Item.cpp menu/Window.cpp Input.cpp windows/WindowTest.cpp Vehicles.cpp Vehicle.cpp Globals.cpp LightGroup.cpp ModelInfo.cpp ModelInfos.cpp windows/WindowMain.cpp windows/WindowLightGroups.cpp windows/WindowSettings.cpp windows/WindowEditing.cpp Patterns.cpp LightGroupDatas.cpp windows/WindowWhiteCorona.cpp windows/WindowShadow.cpp windows/WindowPointLight.cpp windows/WindowFlare.cpp ModConfig.cpp json_reader.cpp json_value.cpp json_writer.cpp iniconfig/INIFile.cpp iniconfig/INISection.cpp SoundSystem.cpp AudioStream.cpp AudioStream3D.cpp windows/WindowSelectPanel.cpp windows/WindowSoundPanel.cpp windows/SoundPanelButton.cpp SoundPanelSystem.cpp windows/WindowSoundPanelSettings.cpp windows/WindowPanel.cpp ConvertOldVersion.cpp | ||
LOCAL_CFLAGS += -O2 -mfloat-abi=softfp -DNDEBUG -std=c++17 | ||
LOCAL_C_INCLUDES += ./include | ||
LOCAL_LDLIBS += -llog | ||
include $(BUILD_SHARED_LIBRARY) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#include "AudioStream.h" | ||
#include "Log.h" | ||
|
||
extern IBASS* BASS; | ||
|
||
AudioStream::AudioStream(std::string src) | ||
{ | ||
Log::file << "Loading audiostream '" << src << "'" << std::endl; | ||
|
||
unsigned flags = BASS_SAMPLE_SOFTWARE; | ||
//if (soundsys->bUseFPAudio) flags |= BASS_SAMPLE_FLOAT; | ||
|
||
if (!(streamInternal = BASS->StreamCreateFile(false, src.c_str(), 0, 0, flags))) | ||
{ | ||
Log::file << "Loading audiostream '" << src << "' failed. Error code: " << BASS->ErrorGetCode() << std::endl; | ||
} | ||
else | ||
{ | ||
Log::file << "Loading audiostream OK" << std::endl; | ||
} | ||
} | ||
|
||
void AudioStream::Play() | ||
{ | ||
BASS->ChannelPlay(streamInternal, true); | ||
} | ||
|
||
void AudioStream::Pause() | ||
{ | ||
BASS->ChannelPause(streamInternal); | ||
} | ||
|
||
void AudioStream::Stop() | ||
{ | ||
BASS->ChannelPause(streamInternal); | ||
BASS->ChannelSetPosition(streamInternal, 0, BASS_POS_BYTE); | ||
} | ||
|
||
void AudioStream::Resume() | ||
{ | ||
BASS->ChannelPlay(streamInternal, false); | ||
} | ||
|
||
void AudioStream::Loop(bool enable) | ||
{ | ||
BASS->ChannelFlags(streamInternal, enable ? BASS_SAMPLE_LOOP : 0, BASS_SAMPLE_LOOP); | ||
} | ||
|
||
void AudioStream::SetVolume(float val) | ||
{ | ||
BASS->ChannelSetAttribute(streamInternal, BASS_ATTRIB_VOL, val); | ||
} | ||
|
||
void AudioStream::Destroy() | ||
{ | ||
if (streamInternal) BASS->StreamFree(streamInternal); | ||
} | ||
|
||
int AudioStream::GetState() | ||
{ | ||
switch (BASS->ChannelIsActive(streamInternal)) | ||
{ | ||
case BASS_ACTIVE_STOPPED: | ||
default: | ||
return -1; | ||
|
||
case BASS_ACTIVE_PLAYING: | ||
case BASS_ACTIVE_STALLED: | ||
return 1; | ||
|
||
case BASS_ACTIVE_PAUSED: | ||
return 2; | ||
}; | ||
} | ||
|
||
void AudioStream::Set3DPosition(const CVector&) | ||
{ | ||
Log::file << "Unimplemented CAudioStream::Set3DPosition(const CVector&)" << std::endl; | ||
} | ||
|
||
void AudioStream::Set3DPosition(float, float, float) | ||
{ | ||
Log::file << "Unimplemented CAudioStream::Set3DPosition(float,float,float)" << std::endl; | ||
} | ||
|
||
void AudioStream::Link(CPlaceable*) | ||
{ | ||
Log::file << "Unimplemented CAudioStream::Link(CPlaceable*)" << std::endl; | ||
} | ||
|
||
void AudioStream::Process() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
//https://github.com/AndroidModLoader/GTASA_CLEO_AudioStreams/blob/main/audiosystem.cpp | ||
|
||
#include "pch.h" | ||
|
||
class AudioStream { | ||
public: | ||
uint64_t streamInternal; | ||
|
||
AudioStream(std::string src); | ||
|
||
void Play(); | ||
void Pause(); | ||
void Stop(); | ||
void Resume(); | ||
void Loop(bool enable); | ||
void SetVolume(float val); | ||
void Destroy(); | ||
int GetState(); | ||
|
||
virtual void Set3DPosition(const CVector& pos); | ||
virtual void Set3DPosition(float x, float y, float z); | ||
virtual void Link(CPlaceable* placeable = NULL); | ||
virtual void Process(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include "AudioStream3D.h" | ||
#include "Log.h" | ||
|
||
extern IBASS* BASS; | ||
|
||
AudioStream3D::AudioStream3D(std::string src) : AudioStream(src) | ||
{ | ||
Log::file << "Loading audiostream 3d '" << src << "'" << std::endl; | ||
|
||
unsigned flags = BASS_SAMPLE_SOFTWARE; | ||
//if (soundsys->bUseFPAudio) flags |= BASS_SAMPLE_FLOAT; | ||
|
||
if (!(streamInternal = BASS->StreamCreateFile(false, src.c_str(), 0, 0, flags))) | ||
{ | ||
Log::file << "Loading audiostream 3d '" << src << "' failed. Error code: " << BASS->ErrorGetCode() << std::endl; | ||
} | ||
else | ||
{ | ||
Log::file << "Loading audiostream 3d OK" << std::endl; | ||
} | ||
} | ||
|
||
|
||
void AudioStream3D::Set3DPosition(const CVector& pos) | ||
{ | ||
position.x = pos.y; | ||
position.y = pos.z; | ||
position.z = pos.x; | ||
link = NULL; | ||
BASS->ChannelSet3DPosition(streamInternal, &position, NULL, NULL); | ||
} | ||
|
||
void AudioStream3D::Set3DPosition(float x, float y, float z) | ||
{ | ||
position.x = y; | ||
position.y = z; | ||
position.z = x; | ||
link = NULL; | ||
BASS->ChannelSet3DPosition(streamInternal, &position, NULL, NULL); | ||
} | ||
|
||
void AudioStream3D::Link(CPlaceable* placeable) | ||
{ | ||
link = placeable; | ||
} | ||
|
||
void AudioStream3D::Process() | ||
{ | ||
if (link) | ||
{ | ||
CVector* pVec = link->GetPosSA(); | ||
position.x = pVec->y; | ||
position.y = pVec->z; | ||
position.z = pVec->x; | ||
} | ||
BASS->ChannelSet3DPosition(streamInternal, &position, NULL, NULL); | ||
//Log::file << "AudioStream3D pos: " << position.x << ", " << position.y << ", " << position.z << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
//https://github.com/AndroidModLoader/GTASA_CLEO_AudioStreams/blob/main/audiosystem.cpp | ||
|
||
#include "pch.h" | ||
|
||
#include "AudioStream.h" | ||
|
||
class AudioStream3D : public AudioStream { | ||
public: | ||
AudioStream3D(std::string src); | ||
protected: | ||
CPlaceable* link; | ||
BASS_3DVECTOR position; | ||
|
||
virtual void Set3DPosition(const CVector& pos); | ||
virtual void Set3DPosition(float x, float y, float z); | ||
virtual void Link(CPlaceable* placeable = NULL); | ||
virtual void Process(); | ||
}; |
Oops, something went wrong.