logging – Obtain log of when audio starts and stops

I want to get a list of timestamped events for when the audio player starts and stops. By “audio player” I mean the one that is common for all apps that you see when you pull down the notification bar in Android 11. So when audio that is not system notifications start or stop.

Any way of doing it would be okay. Either an app or through adb and system logs, or something else. As far as I can tell, Android destroys logs from before that last reboot, but I might be wrong about this. If I can access old logs, that would be a solution.

unity – How can I integrate between the audio volumes settings in the main menu scene and the audio in the game scene?

I have two scenes only : Main Menu and Game
In the Game scene I keep all the game data and gameplay stuff.

In the Main Menu scene I have two sliders for volumes. One for the music and one for the sfx effects.
Both volumes and sliders are working fine and save the music/sfx volumes.

The problem is that the music in the main menu is not the same background music in the game scene.
Same for the sfx effect. In the main menu I just took some sfx effect and playing it when changing the volume.
In the game scene the background music is another one and I have also many audio sources with sfx effects. For example on the player I have a audio source with foot steps audio. On my droid I have audio source with shooting audio clip and so on.

What I want to do in my logic is when I change the volume/s in the main menu that it will effect the volume/s also in the game scene.

When the game start first time the main menu scene is loading and playing a music. Then when making a new game or loading a game the main menu is unloaded and the game scene is loaded with his own music and effects.

I also have in the game scene a script to return to the main menu with the escape key and back to the game. It’s a script for pausing/resuming the game and I want to pause/resume the game audio as well.
When making escape key and the game pause I want to pause also the audio in the game scene when pressing escape again back to the game to resume the audio from the last point.

This screenshot show the main menu with the two audio sources for music and sfx :

Main Menu audio settings

And this is the settings script in the main menu that control also the audio volumes :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.UI;
using TMPro;
using System;
using UnityEngine.Events;
using System.Linq;

public class Settings : MonoBehaviour
{
    (SerializeField) private AudioSource() audioSources;
    public AudioMixer audioMixer;
    public TMP_Dropdown resolutionDropdown;
    public TMP_Dropdown qualityDropdown;
    public Text musicText;
    public Text sfxText;
    public Slider() audioSliders;
    public Toggle fullScreenToggle;

    private Resolution() resolutions;

    private void Awake()
    {
        audioSources = GetComponents<AudioSource>();

        resolutionDropdown.onValueChanged.AddListener(new UnityAction<int>(index =>
        {
            PlayerPrefs.SetInt("resolutionvalue", resolutionDropdown.value);
            PlayerPrefs.Save();

        }));

        qualityDropdown.onValueChanged.AddListener(new UnityAction<int>(index =>
        {
            PlayerPrefs.SetInt("qualityvalue", qualityDropdown.value);
            PlayerPrefs.Save();

        }));

        fullScreenToggle.onValueChanged.AddListener(new UnityAction<bool>(index =>
        {
            PlayerPrefs.SetInt("fullscreen", boolToInt(fullScreenToggle.isOn));
            PlayerPrefs.Save();

        }));
    }

    private void Start()
    {
        qualityDropdown.value = PlayerPrefs.GetInt("qualityvalue");

        var resolutions = Screen.resolutions.Where(resolution => resolution.refreshRate == 60).ToArray();
        resolutionDropdown.ClearOptions();

        List<string> options = new List<string>();

        int currentResolutionIndex = 0;
        for(int i = 0; i < resolutions.Length; i++)
        {
            string option = resolutions(i).width + " x " + resolutions(i).height;
            options.Add(option);

            if(resolutions(i).width == Screen.currentResolution.width &&
                resolutions(i).height == Screen.currentResolution.height)
            {
                currentResolutionIndex = i;
            }
        }

        resolutionDropdown.AddOptions(options);
        resolutionDropdown.value = PlayerPrefs.GetInt("resolutionvalue", currentResolutionIndex);
        resolutionDropdown.RefreshShownValue();

        float musicvolume = PlayerPrefs.GetFloat("musicvolume");
        float sfxvolume = PlayerPrefs.GetFloat("sfxvolume");

        musicText.text = musicvolume.ToString();
        sfxText.text = sfxvolume.ToString();
        audioSliders(0).value = musicvolume / 100f;
        audioSliders(1).value = sfxvolume / 100f;

        fullScreenToggle.isOn = intToBool(PlayerPrefs.GetInt("fullscreen", 0));
        
    }

    public void SetResolution(int resolutionIndex)
    {
        if (resolutions != null)
        {
            Resolution resolution = resolutions(resolutionIndex);
            Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen);
        }
    }

    public void SetMusicVolume(float volume)
    {
        audioMixer.SetFloat("musicvol", Mathf.Log10(volume) * 20);
        musicText.text = Math.Round(volume * 100, MidpointRounding.AwayFromZero).ToString();

        PlayerPrefs.SetFloat("musicvolume", (float)Math.Round(volume * 100, MidpointRounding.AwayFromZero));
    }

    public void SetSfxVolume(float volume)
    {
        audioMixer.SetFloat("sfxvol", Mathf.Log10(volume) * 20);
        sfxText.text = Math.Round(volume * 100, MidpointRounding.AwayFromZero).ToString();

        PlayerPrefs.SetFloat("sfxvolume", (float)Math.Round(volume * 100, MidpointRounding.AwayFromZero));

        if (!audioSources(1).isPlaying)
            audioSources(1).Play();
    }

    public void SetQuality(int qualityIndex)
    {
        QualitySettings.SetQualityLevel(qualityIndex);
    }

    public void SetFullscreen(bool isFullscreen)
    {
        Screen.fullScreen = isFullscreen;        
    }

    int boolToInt(bool val)
    {
        if (val)
            return 1;
        else
            return 0;
    }

    bool intToBool(int val)
    {
        if (val != 0)
            return true;
        else
            return false;
    }
}

At lines 97 and 105 I’m setting and saving the volumes : function SetMusicVolume and SetSfxVolume.
The music and sfx are working fine in the main menu.

Now the Game scene :

In the Game scene I have this script to pause the game and to resume, still without the audio pause/resume part that I’m not sure how to do : And also here it should keep the changes of the volumes in both scenes in case I press the escape key and make changes in the main menu and then back to the game scene it should resume the audio but also to apply the volume/s changes if made :

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class BackToMainMenu : MonoBehaviour
{
    public GameObject() objsToDisable;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (Time.timeScale == 0)
            {
                DisableEnableUiTexts(true);
                SceneManager.UnloadSceneAsync(0);
                Cursor.visible = false;
                Time.timeScale = 1;
            }
            else
            {
                Time.timeScale = 0;
                MenuController.LoadSceneForSavedGame = false;
                SceneManager.LoadScene(0, LoadSceneMode.Additive);
                SceneManager.sceneLoaded += SceneManager_sceneLoaded;

                Cursor.visible = true;
            }
        }
    }

    private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
    {
        DisableEnableUiTexts(false);
    }

    private void DisableEnableUiTexts(bool enabled)
    {
        foreach (GameObject go in objsToDisable)
        {
            if (go.name == "Cameras")
            {
                foreach(Transform child in go.transform)
                {
                    if(child.name == "Main Camera")
                    {
                        if (enabled == false)
                        {
                            child.GetComponent<Camera>().enabled = false;
                        }
                        else
                        {
                            child.GetComponent<Camera>().enabled = true;
                        }
                    }
                }
            }
            else
            {
                go.SetActive(enabled);
            }
        }
    }
}

I also created one audio mixer with two groups name : Main Menu Audio and Game Audio all the Music’s and sfx’s are exposed already :

Audio mixer

My problem is that I can’t figure out how to make the volumes in the main menu to affect the volumes in the game scene too. and how to resume/pause the audio in the game scene in the back to the main menu script ?

Which browsers support flac audio files?

I can play them in Chrome, FF and Edge but I’m concerned there may be some browsers that they may not work in.

Is the .flac audio file format supported by WordPress?

Yes, the flac audio format is supported. See the doc block for the function wp_get_mime_types() (and other mentions).

/**
 * Retrieve list of mime types and file extensions.
 *
 * @since 3.5.0
 * @since 4.2.0 Support was added for GIMP (.xcf) files.
 * @since 4.9.2 Support was added for Flac (.flac) files.
 * @since 4.9.6 Support was added for AAC (.aac) files.
 *
 * @return string() Array of mime types keyed by the file extension regex corresponding to those types.
 */
function wp_get_mime_types() {

Whether the visitor’s browser supports it is a completely different question and not in WordPress’ hands.

Why can’t open the realtek audio manager?

I download and install the latest 0009-64bit_Win7_Win8_Win81_Win10_R282.exe from its official website
realtek audio manager.

Why can’t open Realtek Audio Manager in my Windows 10 to double click the RtkNGUI64.exe ?

enter image description here

Place Audio Ad in a Podcast Episode up to 5,000 for $15

Place Audio Ad in a Podcast Episode up to 5,000

Have your audio ad heard on a podcast that is available in 40 + countries across the world. Be recognized on every major streaming platform when your heard on ENDS Podcast.

Key Facts:

  • Ad will run up to 5,000 Streams (Unless Paid For Permanent Ad Slot)
  • Reach a global audience including 40+ countries across the world.
  • Episode topics ranging from Music, Business, Politics, Health, and Interviews
  • Every episode is promoted on platforms such as Twitter, Facebook, Tumblr, Pinterest, LinkedIn, and VK

.(tagsToTranslate)Podcast(t)advertisement(t)sponsorship

audio – How do I get the “Headshot” riff sounds from Orcs Must Die?

On the PC game “Orcs Must Die!,” when you get a headshot on an orc, it plays a short little electric guitar riff. I want that sound effect as a text message tone.

I looked in the steamapps/common/Orcs Must Die!/data/sound folder and opened several FSB files and listened to the WAV files within them, but I couldn’t find the sounds I was looking for. When I tested the game, I realized it must be an actual music effect, because when the music is turned off, so are the riffs.

Unfortunately, the music folder in the data folder has an FSB file whose WAV files will not play. I’m pretty sure the files I’m looking for are “Headshot_Delay” 01–07, but Windows Media Player says it can’t play them, and when I open them as Raw files on Audacity, I just hear a high-pitched ringing sound.

I know this is a super specific problem, but could anyone who has the game help me figure out how to isolate these sound effect files? I can’t record it directly from the game because of the background music, and I’m out of ideas.

Capture both audio and video from iOS device via USB in OBS

I want to record both screen and audio from iOS device using my MacBook, so I connected the device to my computer using cable. I then opened QuickTime Player, click “File -> New Movie Recording”, and select the iOS device as video and audio input from the drop down menu next to the record button, and everything works fine.

I then tried OBS as QuickTime is not very flexible. The video is available in “video capture device”, but the audio cannot be found anywhere. After a bit research, I found audio input can be enabled using “Audio MIDI Setup”. However, with OBS opened, the audio device immediately became disabled about a second after I click “Enable” in the Audio MIDI Setup. When I close the OBS (or remove the video input from the iOS device), however, the audio input in the MIDI setup works, and I can record audio in OBS via “audio input capture”.

The frustrating thing is that I cannot record both in OBS, it seems like iOS device can only operate in 1 of the 2 modes that provides either video (screen cast) or audio via USB, but not both. But how does QuickTime works? The audio input option from iOS device is in the QuickTime even when the device is not enabled in Audio MIDI Setup (and when enabled, the device is listed twice with slightly different names). This seems like QuickTime use a different mechanism to grab the audio input from iOS device, and I am not aware of any other applications can do this.

The workaround I found is to record the main speaker output (using SoundFlower or other similar tools) since QuickTime will output the audio from iOS device to main speaker of my MacBook. However, the setup is quite complicated and not very flexible (included below).

Any better ways to do this?


Appendix (how to use SoundFlower to workaround this)

  1. First connect the device via cable and open QuickTime. Go to “File -> New Audio Recording”, and select the device in the drop down menu next to record button (but don’t hit record). This will output the audio from device to main speaker.
  2. Open Audio MIDI Setup, on the lower right corner, click “+ -> Create Multi-Output Device”, add both SoundFlower and Main Speaker.
  3. Open “System Preferences -> Sound” and set the output to the device just created. You can now record the audio from SoundFlower in OBS.

audio – MBP 2016: Sound Popping

I can’t find any definitive answers on a fix to the sound popping present on my MBP 2016 – running Big Sur 11.1. Outside of an acknowledged bug, does anyone have any guidance on a fix?

Symptoms:

  • After unknown trigger, popping or cracking sound when playing music through the MBP 2016 speakers

Solutions Investigated:

  • I’ve seen references to power-levels, but on AC Power with a 100% battery it still occurs
  • Killing coreaudiod seems to help, but not eliminate, the pops

Thank you

Apple MainStage audio output device changes automatically after some time

I am using Apple MainStage 3.5 and I route the Audio Output to a Loopback virtual device. And this works like a charm. Until it switches to another device after some inactivity.

I tried another Loopback device, but the same thing keeps happening. Does anybody have an idea how to tell MainStage to not switch devices? I thought that setting the hot-plug behavior to do nothing was the key. But it does not seem to work.

I did some Googling, but could not find an answer to my question. I hope somebody knows.

enter image description here