# Multi Sound Playlist Shuffle is Not Randomizing?

**URL:** <https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964>\
**Category:** FMOD Studio\
**Created:** [February 5, 2017, 11:45pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964 "2017-02-05T23:45:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bignic](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bignic](https://qa.fmod.com/u/bignic)\
**Post date:** [February 5, 2017, 11:45pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/1 "2017-02-05T23:45:34Z")

</div>

The playlist in a multi sound object appears to play in a shuffled order when shuffle is enabled but it seems to always play the SAME shuffled order every time I restart my application.

This is obviously not desired behaviour - why does the shuffle function not have a random seed set each time the bank is loaded?

Is there any way to actually randomize the play list of a multi sound object properly?

**EDIT: Just want to note that this behaviour is not evident INSIDE Studio as it plays randomly all the time, it only happens when I’m using the events from within my app.**

EDIT 2: Using the following code - still no change in behaviour. Tried setAdvancedSettings both before and after system-\>initialize, with no change. Not seeing any errors. cbSize is 108, and random seed (as expected) is always different and greater than 2. Any idea what I’m doing wrong?

```
    system = NULL;
	ERRCHECK(FMOD::Studio::System::create(&system));
	
	lowLevelSystem = NULL;
	ERRCHECK(system->getLowLevelSystem(&lowLevelSystem));
	ERRCHECK(lowLevelSystem->setSoftwareFormat(0, FMOD_SPEAKERMODE_STEREO, 0));

	FMOD_ADVANCEDSETTINGS settings;
	settings.randomSeed = util.randInt(2, 10000);
	settings.cbSize = sizeof(FMOD_ADVANCEDSETTINGS);
	std::cout << " settings.cbSize= " << settings.cbSize << " settings.randomSeed =" << settings.randomSeed << "\n";
	ERRCHECK(lowLevelSystem->setAdvancedSettings(&settings));

	ERRCHECK(system->initialize(1024, FMOD_STUDIO_INIT_NORMAL, FMOD_INIT_NORMAL, extraDriverData));
```

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [February 9, 2017, 2:46am UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/2 "2017-02-09T02:46:44Z")

</div>

Hi Nicholas,

Randomisation in Multi Sounds is based on the random seed provided by your FMOD initialization settings. By default, the random seed will default to 0, meaning that you will get the same shuffled order deterministically, each time you start up your game.

You can read more about Random Seeds here:

> **[Random seed](https://en.wikipedia.org/wiki/Random_seed)**
>
> A random seed (or seed state, or just seed) is a number (or vector) used to initialize a pseudorandom number generator.
> For a seed to be used in a pseudorandom number generator, it does not need to be random. Because of the nature of number generating algorithms, so long as the original seed is ignored, the rest of the values that the algorithm generates will follow probability distribution in a pseudorandom manner.
> A pseudorandom number generator's number sequence is completely determined by t...

Our Unreal Engine 4 and Unity integrations both set the random seed to the system time, so you should get a quasi-random behaviour in game.

If you are using a custom integration, you can set the random seed on the advance settings struct by using the System::setAdvancedSettings function and setting FMOD\_ADVANCEDSETTINGS.randomSeed. Please see our API documentation for more details:  
[http://www.fmod.org/documentation/#content/generated/FMOD\_System\_SetAdvancedSettings.html](http://www.fmod.org/documentation/#content/generated/FMOD_System_SetAdvancedSettings.html)  
[http://www.fmod.org/documentation/#content/generated/FMOD\_ADVANCEDSETTINGS.html](http://www.fmod.org/documentation/#content/generated/FMOD_ADVANCEDSETTINGS.html)

---

<div class="post-metadata">

**Author:** ![bignic](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bignic](https://qa.fmod.com/u/bignic)\
**Post date:** [February 9, 2017, 5:12pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/3 "2017-02-09T17:12:19Z")

</div>

> [@](#):
>
> Hi Nicholas,
> 
> Randomisation in Multi Sounds is based on the random seed provided by your FMOD initialization settings. By default, the random seed will default to 0, meaning that you will get the same shuffled order deterministically, each time you start up your game.
> 
> You can read more about Random Seeds here:  
> [Random seed - Wikipedia](https://en.wikipedia.org/wiki/Random_seed)
> 
> Our Unreal Engine 4 and Unity integrations both set the random seed to the system time, so you should get a quasi-random behaviour in game.
> 
> If you are using a custom integration, you can set the random seed on the advance settings struct by using the System::setAdvancedSettings function and setting FMOD\_ADVANCEDSETTINGS.randomSeed. Please see our API documentation for more details:  
> [http://www.fmod.org/documentation/#content/generated/FMOD\_System\_SetAdvancedSettings.html](http://www.fmod.org/documentation/#content/generated/FMOD_System_SetAdvancedSettings.html)  
> [http://www.fmod.org/documentation/#content/generated/FMOD\_ADVANCEDSETTINGS.html](http://www.fmod.org/documentation/#content/generated/FMOD_ADVANCEDSETTINGS.html)

Thanks for the info - having trouble implementing it. See edit above for code.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [February 13, 2017, 12:47am UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/4 "2017-02-13T00:47:06Z")

</div>

Hi Nicholas,

You need to make sure that you are setting these settings _before_ FMOD Studio is initialised. Could you let me know how you are building your game (Unity, UE4, custom?)?

---

<div class="post-metadata">

**Author:** ![bignic](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bignic](https://qa.fmod.com/u/bignic)\
**Post date:** [February 25, 2017, 5:22pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/5 "2017-02-25T17:22:48Z")

</div>

Using Visual Studio Community 2015 with C++. Code above shows that I’m doing it before initialize - what else can I try?

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [February 27, 2017, 4:48am UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/6 "2017-02-27T04:48:56Z")

</div>

Hi Nicholas,

Your code looks correct and should work, which leads me to believe there might be an issue elsewhere in your game code. Unfortunately without seeing the source code we can’t really offer further advice.

Are you able to reproduce this in a separate project (eg. press a button to play the multi sound)?

---

<div class="post-metadata">

**Author:** ![snake22000](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@snake22000](https://qa.fmod.com/u/snake22000)\
**Post date:** [February 19, 2020, 2:27pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/7 "2020-02-19T14:27:22Z")

</div>

Hello, also having this issue. Multisound instruments are not randomized correctly.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [February 21, 2020, 4:00am UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/8 "2020-02-21T04:00:01Z")

</div>

Have you tried editing the random seed before initializing the FMOD system?

---

<div class="post-metadata">

**Author:** ![rontt](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rontt](https://qa.fmod.com/u/rontt)\
**Post date:** [January 13, 2026, 9:10pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/9 "2026-01-13T21:10:48Z")

</div>

I realize this is a old question, but I also can’t get multi-instruments to be seeded at launch.

I am using C and not using Unity, etc.

```c
	result = FMOD_Studio_System_Create(&_fmod_studio_system, FMOD_VERSION);
	FMOD_Studio_System_GetCoreSystem(_fmod_studio_system, &_fmod_system);
    ...
    FMOD_ADVANCEDSETTINGS settings2;
	settings2.cbSize = sizeof(settings2);
	FMOD_System_GetAdvancedSettings(_fmod_system, &settings2);
	settings2.randomSeed = 500; //(unsigned int)time(NULL);
	FMOD_System_SetAdvancedSettings(_fmod_system, &settings2);
    ...
	result = FMOD_Studio_System_Initialize(_fmod_studio_system, fmod_max_channels, fmod_studio_init_flags, fmod_init_flags, 0);

```

It doesn’t seem to matter what I set `randomSeed`to. I am using FMOD 2.03.08

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [January 29, 2026, 6:11am UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/10 "2026-01-29T06:11:01Z")

</div>

Hi, sorry for the delayed response!

`FMOD_ADVANCEDSETTINGS` needs to have all of its values zeroed out before being passed to `FMOD_System_SetAdvancedSettings` in order to ensure they’re all at their default values. You can do this like so:

```C
    FMOD_ADVANCEDSETTINGS settings2;
    memset(&settings2, 0, sizeof(FMOD_ADVANCEDSETTINGS)); //<--
    settings2.cbSize = sizeof(FMOD_ADVANCEDSETTINGS);
    settings2.randomSeed = 500;

```

This should ensure that the system accepts your provided advanced settings struct. You should be able to verify whether the values are set as expected by using the logging versions of the libs (L suffix) and setting your logging level to `FMOD_DEBUG_LEVEL_LOG` before system creation, like so:

```C
FMOD_Debug_Initialize(FMOD_DEBUG_LEVEL_LOG, FMOD_DEBUG_MODE_TTY, 0, nullptr);

```

---

<div class="post-metadata">

**Author:** ![rontt](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rontt](https://qa.fmod.com/u/rontt)\
**Post date:** [January 30, 2026, 6:33pm UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/11 "2026-01-30T18:33:18Z")

</div>

I do a GetSettings right before I change the one value, I would assume thay are set correct from the get?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [February 2, 2026, 3:40am UTC](https://qa.fmod.com/t/multi-sound-playlist-shuffle-is-not-randomizing/12964/12 "2026-02-02T03:40:49Z")

</div>

If you check the return value of the `FMOD_System_GetAdvancedSettings` call, I expect you’ll find it’s returning an invalid parameter error (value 31). This is because even when retrieving the existing value, the system expects the struct to be zeroed out so that rogue/uninitialized values or pointers aren’t passed out of the FMOD system.

This isn’t explicitly noted in our documentation, so I’ve flagged the relevant API pages for improvements.
