Skip to content
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

Pan #25

Merged
merged 2 commits into from
Mar 30, 2024
Merged

Pan #25

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion flixel/sound/FlxSound.hx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class FlxSound extends FlxBasic

/**
* Pan amount. -1 = full left, 1 = full right. Proximity based panning overrides this.
*
* Note: On desktop targets this only works with mono sounds, due to limitations of OpenAL.
* More info: [OpenFL Forums - SoundTransform.pan does not work](https://community.openfl.org/t/windows-legacy-soundtransform-pan-does-not-work/6616/2?u=geokureli)
*/
public var pan(get, set):Float;

Expand Down Expand Up @@ -764,7 +767,9 @@ class FlxSound extends FlxBasic

inline function set_pan(pan:Float):Float
{
return _transform.pan = pan;
_transform.pan = pan;
updateTransform();
return pan;
}

inline function get_time():Float
Expand Down
Loading