Replies: 1 comment
-
You need a signal chain like this: Here's some example code var mp3 = new AudioFileReader(@"C:\Sounds\wolf-howl-6310.mp3");
var loop = new LoopStream(mp3);
loop.EnableLooping = true;
volume = new VolumeStereoSampleProvider(loop.ToSampleProvider());
volume.VolumeLeft = 0f;
volume.VolumeRight = 1f;
outputDevice.Init(volume);
outputDevice.Play(); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I'm working on a program to play background music and sounds for a display that will automatically change based on Time of Day. To pull this off it needs to loop an MP3 until the next trigger time hits and then it starts looping the next track in the list.
I would also like to be able to adjust the Balance as the loop is playing as there are times when you want a track to just come out of a specific channel do to prop placement, etc.
I can get the Looping to work, or I can get the balance to change in real time, but I can't seem to do both.
This will let me alter the left and right volume in real time, but won't loop of course:
This code adds the looping but once I do this altering the left and right volume settings has no effect:
How would I go about making looping work and be able to change the balance at that same time???
Beta Was this translation helpful? Give feedback.
All reactions