-
Notifications
You must be signed in to change notification settings - Fork 67
OpenAL support #784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
OpenAL support #784
Conversation
b2c6d57
to
8d58e1d
Compare
// union | ||
// { | ||
HSAMPLE m_sample; | ||
H3DSAMPLE m_3DSample; | ||
HSTREAM m_stream; | ||
// }; | ||
|
||
PlayingAudioType m_type; | ||
volatile PlayingStatus m_status; // This member is adjusted by another running thread. | ||
AudioEventRTS *m_audioEventRTS; | ||
void *m_file; // The file that was opened to play this | ||
Bool m_requestStop; | ||
Bool m_cleanupAudioEventRTS; | ||
Int m_framesFaded; | ||
|
||
PlayingAudio() : | ||
m_type(PAT_INVALID), | ||
m_audioEventRTS(NULL), | ||
m_requestStop(false), | ||
m_cleanupAudioEventRTS(true), | ||
m_sample(0), | ||
m_3DSample(0), | ||
m_stream(0), | ||
m_framesFaded(0) | ||
{ } | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this all changed when i merged generals and zero hour, i reverted the changes zero hour brought in and went with the original generals way of doing it by using the union again. I then initialise m_sample(NULL) and dropped m_3DSample and m_stream from the initialiser list. They are all just pointers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, will adapt this. Thanks for the heads up
c3b0cbf
to
feeb1a8
Compare
if(OpenAL_FOUND) | ||
target_sources(z_gameenginedevice PRIVATE | ||
Include/OpenALDevice/OpenALAudioManager.h | ||
# Include/OpenALDevice/OpenALAudioStream.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these for future use?
@@ -19,7 +19,7 @@ | |||
// FILE: MilesAudioManager.h ////////////////////////////////////////////////////////////////////////// | |||
// MilesAudioManager implementation | |||
// Author: John K. McDonald, July 2002 | |||
|
|||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VC6 doesn't support pragma, surprised there are no header guards here.
#ifdef RTS_HAS_OPENAL | ||
#include "OpenALDevice/OpenALAudioManager.h" | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth if else like with creating the miles audio manager?
// FILE: MilesAudioFileCache.h ////////////////////////////////////////////////////////////////////////// | ||
// MilesAudioManager implementation | ||
// Author: John K. McDonald, July 2002 | ||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto on header guards
@@ -311,7 +311,7 @@ FFmpegVideoStream::FFmpegVideoStream(FFmpegFile* file) | |||
m_ffmpegFile->setFrameCallback(onFrame); | |||
m_ffmpegFile->setUserData(this); | |||
|
|||
#ifdef RTS_USE_OPENAL | |||
#if 0//def RTS_HAS_OPENAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this and similar here meant to be commented out for now?
struct OpenAudioFile | ||
{ | ||
ALuint m_buffer = 0; | ||
FFmpegFile* m_ffmpegFile = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this also the handle for regular audio files that are setup from audioEventRTS objects?
Ah is it that FFMpeg is being used to decode the audio file?
No description provided.