{"id":58,"date":"2024-09-21T23:05:26","date_gmt":"2024-09-21T23:05:26","guid":{"rendered":"https:\/\/unity3dperformance.com\/?p=58"},"modified":"2024-09-21T23:05:26","modified_gmt":"2024-09-21T23:05:26","slug":"audio-optimization-unity-high-ram-usage","status":"publish","type":"post","link":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/","title":{"rendered":"Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage"},"content":{"rendered":"\n<p>We\u2019re back with our Visual Novel game. In the previous <a href=\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/how-inefficient-code-can-lead-to-high-ram-usage-in-unity\/\">article<\/a>, I discussed how textures can use a lot of RAM. This time, we\u2019ll focus on sounds, specifically background music.<\/p>\n\n\n\n<p>In the game, a looping music track plays in the background, supporting the story. How can something like this use so much RAM? The answer is improper audio settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"584\" height=\"635\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png\" alt=\"\" class=\"wp-image-60\" srcset=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png 584w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3-276x300.png 276w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><figcaption class=\"wp-element-caption\">Old settings<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-7-1024x466.png\" alt=\"\" class=\"wp-image-66\" srcset=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-7-1024x466.png 1024w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-7-300x137.png 300w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-7-768x350.png 768w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-7-1536x699.png 1536w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-7.png 1722w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">RAM usage<\/figcaption><\/figure>\n\n\n\n<p>The music track lasts several minutes and is not set to streaming mode. As a result, the entire audio file is loaded into RAM, leading to high RAM usage.<\/p>\n\n\n\n<p>Fortunately, you don\u2019t need to change any code! Just adjusting the audio settings can solve the problem.<\/p>\n\n\n\n<p>The solution is to switch the settings to &#8220;streaming.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"777\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-5.png\" alt=\"\" class=\"wp-image-62\" style=\"width:840px;height:auto\" srcset=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-5.png 576w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-5-222x300.png 222w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><figcaption class=\"wp-element-caption\">New settings<\/figcaption><\/figure>\n\n\n\n<p>By doing this, you can significantly reduce RAM usage, though it may slightly increase CPU load.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-6-1024x466.png\" alt=\"\" class=\"wp-image-63\" srcset=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-6-1024x466.png 1024w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-6-300x137.png 300w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-6-768x350.png 768w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-6-1536x699.png 1536w, https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-6.png 1722w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">RAM usage after new import settings<\/figcaption><\/figure>\n\n\n\n<p>Optimizing audio settings in Unity is essential for managing RAM usage in games. Setting long music tracks to streaming mode can significantly reduce system resource consumption, enhancing game performance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re back with our Visual Novel game. In the previous article, I discussed how textures can use a lot of RAM. This time, we\u2019ll focus on sounds, specifically background music. In the game, a looping music track plays in the background, supporting the story. How can something like this use so much RAM? The answer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[9,8],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-unity-optimization","tag-audio","tag-ram-usage"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage - Unity3D Performance Blog<\/title>\n<meta name=\"description\" content=\"Discover how poor audio settings in Unity can lead to high RAM usage. Optimize your music tracks to improve game performance and reduce resource consumption\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage - Unity3D Performance Blog\" \/>\n<meta property=\"og:description\" content=\"Discover how poor audio settings in Unity can lead to high RAM usage. Optimize your music tracks to improve game performance and reduce resource consumption\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/\" \/>\n<meta property=\"og:site_name\" content=\"Unity3D Performance Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-21T23:05:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png\" \/>\n<meta name=\"author\" content=\"Rufi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rufi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/\",\"url\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/\",\"name\":\"Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage - Unity3D Performance Blog\",\"isPartOf\":{\"@id\":\"https:\/\/unity3dperformance.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png\",\"datePublished\":\"2024-09-21T23:05:26+00:00\",\"dateModified\":\"2024-09-21T23:05:26+00:00\",\"author\":{\"@id\":\"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c\"},\"description\":\"Discover how poor audio settings in Unity can lead to high RAM usage. Optimize your music tracks to improve game performance and reduce resource consumption\",\"breadcrumb\":{\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#primaryimage\",\"url\":\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png\",\"contentUrl\":\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png\",\"width\":584,\"height\":635},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/unity3dperformance.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Audio Optimization in Unity\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unity3dperformance.com\/#website\",\"url\":\"https:\/\/unity3dperformance.com\/\",\"name\":\"Unity3D Performance Blog\",\"description\":\"Discover tips and techniques to optimize your Unity3D projects for better performance and efficiency.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unity3dperformance.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c\",\"name\":\"Rufi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/unity3dperformance.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g\",\"caption\":\"Rufi\"},\"sameAs\":[\"http:\/\/unity3dperformance.com\"],\"url\":\"https:\/\/unity3dperformance.com\/index.php\/author\/admin2826\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage - Unity3D Performance Blog","description":"Discover how poor audio settings in Unity can lead to high RAM usage. Optimize your music tracks to improve game performance and reduce resource consumption","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/","og_locale":"en_US","og_type":"article","og_title":"Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage - Unity3D Performance Blog","og_description":"Discover how poor audio settings in Unity can lead to high RAM usage. Optimize your music tracks to improve game performance and reduce resource consumption","og_url":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/","og_site_name":"Unity3D Performance Blog","article_published_time":"2024-09-21T23:05:26+00:00","og_image":[{"url":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png"}],"author":"Rufi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rufi","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/","url":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/","name":"Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage - Unity3D Performance Blog","isPartOf":{"@id":"https:\/\/unity3dperformance.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#primaryimage"},"image":{"@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#primaryimage"},"thumbnailUrl":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png","datePublished":"2024-09-21T23:05:26+00:00","dateModified":"2024-09-21T23:05:26+00:00","author":{"@id":"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c"},"description":"Discover how poor audio settings in Unity can lead to high RAM usage. Optimize your music tracks to improve game performance and reduce resource consumption","breadcrumb":{"@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#primaryimage","url":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png","contentUrl":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/obraz-3.png","width":584,"height":635},{"@type":"BreadcrumbList","@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/21\/audio-optimization-unity-high-ram-usage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/unity3dperformance.com\/"},{"@type":"ListItem","position":2,"name":"Audio Optimization in Unity"}]},{"@type":"WebSite","@id":"https:\/\/unity3dperformance.com\/#website","url":"https:\/\/unity3dperformance.com\/","name":"Unity3D Performance Blog","description":"Discover tips and techniques to optimize your Unity3D projects for better performance and efficiency.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unity3dperformance.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c","name":"Rufi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/unity3dperformance.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g","caption":"Rufi"},"sameAs":["http:\/\/unity3dperformance.com"],"url":"https:\/\/unity3dperformance.com\/index.php\/author\/admin2826\/"}]}},"_links":{"self":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":3,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts\/58\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}