[Libgdx]Playing music while loading assets

Hi, I’m making a mp3 player and here is the problem, the player have a bunch of pages and one page contains 60 elements to load (30 mp3s and 30 jpgs). So everything works fine but the problem is that, if a music is playing, and then I load a new page, then the music stutter while the assets are loading.

So is there a way to allocate less memory while loading or something like that so the music plays smoothly even when loading things?

Here is the loading method if needed.


	public static boolean loadSongs(String path, int page) 
    {
        File root = new File(path);
        File[] list = root.listFiles();
        if (list == null) return false;

        Globals.currentDirFileNumber = root.listFiles().length;
        int i = 0;
        
        for (File f : list)
        {       
        	if(i < 30*2*(page-1) - 1)
        	{
        		i++;
        		continue;
        	}
        	if(i > 30*2*(page-1) + 60)
        		break;
        	
            if (f.isDirectory()) 
            {
            	if(!Globals.directories.contains(f.toString().replace("\\", "/") + "/"))
            	{
            		Globals.directories.add(f.toString().replace("\\", "/") + "/");
            	}
            } else
            {
            	String fileType = f.getName().substring(f.getName().length()-4, f.getName().length());
            	String fileName = f.getName().substring(0, f.getName().length()-4);
            	
            	if(fileType.equalsIgnoreCase(".mp3"))
            	{	
            		Globals.assets.load(f.toString(), Music.class);                              		
            		System.out.println("Loaded MP3 : " + f);
            	}
            	if(fileType.equalsIgnoreCase(".jpg"))
            	{
            		Globals.assets.load(f.toString(), Texture.class);
            		System.out.println("Loaded JPG : " + f);
            	}
            	
            	if(Globals.songs.get(fileName) == null && fileType.equalsIgnoreCase(".mp3") || fileType.equalsIgnoreCase(".jpg"))
        		{
            		Song song = new Song(f.toString(), fileName);
            		if(!song.isBroken())
            		{
            			Globals.songs.put(fileName, new Song(f.toString(), fileName));
            		}
            	}
            }
            i++; 
        }
        return !Globals.songs.isEmpty();
    }