Lesson 5

Table of Contents

Sound SFX Substitute on Mobile

With a collection of sound variations in a Random Container, you can easily exclude certain objects and thereby reduce the runtime memory usage. But, when you have a few long sound files, you might not have that option. In such cases, you can make a shorter duplicate and trim down its length, without having to import a new sound file. Let’s now reduce the length of an ambience to a maximum of 30 seconds on Android.

  1. In the Platform Selector, make sure Android is selected.

  2. In the Search field, type ‘Ambient Desert Day’ and right-click on the Ambient_Day_Desert_Long Sound SFX to prompt the shortcut menu, then select Find in Project Explorer > Sync Group 1.

    Let’s now make a shorter duplicate of the audio object.

  3. In the Project Explorer, right-click on Ambient_Day_Desert_Long Sound SFX and select Copy.

  4. Right-click on the Ambient_Region_Desert_Day Random Container and select Paste.

  5. Rename the Ambient_Day_Desert_Long_01 audio object to Ambient_Day_Desert_Short.

  6. In the Contents Editor, double-click the audio source to open it in the Source Editor.

  7. Drag the Trim End handle down to approximately 30 seconds.

  8. In the property list, verify that the Trim End property is set to 30.

  9. In the Source Editor, select the Conversion tab.

    In this tab you will be able to see the memory size of the audio file once converted.

  10. Right-click in the Source Editor and select Convert….

  11. Enable your currently selected platform (Android), then click OK.

    The converted memory usage of the trimmed audio source will now be displayed in the File Properties group box.

    By comparison, Ambient_Region_Desert_Long had a File Size of 278 KB, whereas Ambient_Region_Desert_Short has been reduced to nearly a 4th of the size. Let’s now Unlink the Ambient_Region_Desert_Short Sound SFX from Windows and the Ambient_Region_Desert_Long Sound SFX from Android.

  12. Right-click the Ambient_Day_Desert_Long Sound SFX and select Inclusion > Unlink.

  13. Exclude the Ambient_Day_Desert_Long Sound SFX.

    You would now have excluded the long variation from Android while keeping it included for all other platforms. Next, you’ll need to exclude the short one from the main platforms while including for Android.

  14. Exclude the Ambient_Day_Desert_Short Sound SFX.

  15. Unlink the Ambient_Day_Desert_Short Sound SFX.

  16. Include the Ambient_Day_Desert_Short Sound SFX.

By adding substitutes for platforms with lower resources, you can not only reduce the memory usage significantly, but also have different settings on each object, like Playback Limits that will limit the number of concurrent voices. Keep in mind that while allowing for having different settings, this can also duplicate your workload. As such, good practice is to add substitutes later in development.


Was this page helpful?