Skip to content

fix position & remove flag - #61

Merged
x87 merged 1 commit into
cleolibrary:masterfrom
GeTechG:fix-CScriptEngine
Jul 7, 2022
Merged

x87 merged 1 commit into
cleolibrary:masterfrom
GeTechG:fix-CScriptEngine

Conversation

@GeTechG

@GeTechG GeTechG commented Jul 6, 2022

Copy link
Copy Markdown
Contributor

I was interested in the issue of #59. I also found another problem. When calling 0AC2: set_play_3d_audio_stream_at_coords the position of the audio changes with the coordinate axes rearranged.

position.x = pos.y;
position.y = pos.z;
position.z = pos.x;

And then again in the method C3DAudioStream::Process() the coordinates are transposed.
BASS_ChannelSet3DPosition(streamInternal, &BASS_3DVECTOR(position.y, position.z, position.x), nullptr, nullptr);

Because of that the sound was not audible.

I also changed a couple of fields for the newer plugin sdk, maybe how to separate this change.

Issues Found:

  • When loading ogg in stereo, for 3d audio, stream creation gets an error with code 20 - BASS_ERROR_ILLPARAM. As I understand it is just because 3d requires mono audio. Flag BASS_SAMPLE_MONO for some reason has no effect. Maybe I did something wrong.
  • I don't know how much of a problem this is, but my mp3 still works as mono, but ogg just works right.

fix 3d audio on coords & remove flag BASS_DEVICE_DEFAULT
@GeTechG GeTechG mentioned this pull request Jul 7, 2022
@x87

x87 commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

@GeTechG thanks for the fixes. Please clarify:

Issues Found

Are those new issues introduced by the proposed change in the pull request, or existing issues in 4.4.0?

@x87 x87 added the bug fix label Jul 7, 2022
@GeTechG

GeTechG commented Jul 7, 2022

Copy link
Copy Markdown
Contributor Author

Are those new issues introduced by the proposed change in the pull request, or existing issues in 4.4.0?

Yes, the problem is also observed on pure 4.4.0

@x87
x87 merged commit fdea861 into cleolibrary:master Jul 7, 2022
@GeTechG
GeTechG deleted the fix-CScriptEngine branch July 8, 2022 08:59
@x87 x87 mentioned this pull request Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants