Project

General

Profile

Actions

Emulator Issues #2796

closed

PulseAudio - sound skipping - suggest increasing buffer size

Added by darumo over 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Games music giving almost imperceptible sound skipping, probably need more buffer.

It sounds much better to change the code in this way in pulseaudio plugin:

void PulseAudio::SoundLoop()
{
if (!PulseInit()) {
thread_data = 2;
return;
}
while (!thread_data)
{
int err;
//int frames_to_deliver = 512;
int frames_to_deliver = 768;
m_mixer->Mix(reinterpret_cast<short *>(mix_buffer), frames_to_deliver);
if (pa_simple_write(handle, mix_buffer, frames_to_deliver * 2 * 2, &err) < 0)
{
ERROR_LOG(AUDIO, "pa_simple_write fail: %s", pa_strerror(err));
}
}
PulseShutdown();
thread_data = 2;
}

Actions #1

Updated by darumo over 14 years ago

Could we make to increase or decrease the buffer as an option in the plugin? This way each person can adjust.

Actions #2

Updated by frango0010 over 14 years ago

That would be amazing, since the latest buffer size changes they made on the hle dsp turned the audio of many games into crackling crap audio... no offense...
If we could set the best config for ourselver that would be nice...

Actions #3

Updated by frango0010 over 14 years ago

And i'm not refering only to this Pulseaudio... I use windows... so Dsound is my point...

Actions #4

Updated by skidau over 14 years ago

frango, which revision are you referring to?

Actions #5

Updated by nakeee over 14 years ago

why not just make the buffer big enough for everyone to be happy?

Actions #6

Updated by darumo over 14 years ago

large buffer is more delay, the value should be as low as possible to sound right, but now is too low and sounds bad in my Audigy2, so said it would be good that the user could change this in the options.

(is translated with Google, complaints of bad writing to them xD)

Actions #7

Updated by skidau almost 14 years ago

  • Category set to dsp
Actions #8

Updated by Anonymous over 13 years ago

ping

Actions #10

Updated by Billiard26 almost 12 years ago

  • Category deleted (dsp)
  • Issue type set to Bug
  • Operating system N/A added
Actions #11

Updated by Billiard26 almost 12 years ago

  • Status changed from New to Questionable

Is this issue relevant after r020ab743a90c165e836d4bb3cce57cb60443ad7e?

Actions #12

Updated by darumo almost 12 years ago

I have problems in some videos and music (very large slowdown and skipping), but no problems in sound effects. If I use Alsa these problems do not exist in those games.

Metroid M (R3OP01)
Onechanbara (RONPG9)
Punch-Out! (R7PP01)

I wanted to have tested the game Muramasa (RSFP99) but seems to work now (I did before disabling function "progressive image" but that option does not exist or do not see) and maybe the NTSC version has the same problem.

Separate problem is that I had to add the ISOs folder manually. (add my Home folder not the selected folder)

Actions #13

Updated by darumo almost 12 years ago

Muramasa NTSC so I could try and it works well. (the PAL does not currently work in the emulator for what I see)

Besides the problem when it occurs slows the emulator, but the emulator says it goes to 100% speed ...

Doing more testing I realized that the problem is not present with LLE, the problem only occurs in HLE mode. The problem is when you combine HLE and pulseaudio.

Actions #14

Updated by darumo almost 12 years ago

Dolphin Revision: 020ab743a90c

Kubuntu 12.10 64bit
i5 2500k
Nvidia 560ti
Asus Xonar D2

Actions #15

Updated by Billiard26 almost 12 years ago

@ darumo
Thanks, does changing BUFFER_SAMPLES from 512 to 768 alleviate the issue again?

Actions #16

Updated by darumo almost 12 years ago

I'm sorry, I've been telling problems and everything came through remnants of old versions compilations. (When I deleted everything and rebuilt from zero everything worked)

Everything works perfectly ... Sorry for the inconvenience. And the old problem of buffer you have it solved, no need to increase it.

Actions #17

Updated by Billiard26 almost 12 years ago

  • Status changed from Questionable to Fixed

yay

Actions

Also available in: Atom PDF