Skip to content

Commit

Permalink
pulse: fix buffer size, 2nd try
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Nov 12, 2024
1 parent 7172e37 commit c2f7a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/pulse/audiodrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool Audio_Pulse::open(AudioConfig &cfg)

try
{
_sampleBuffer = new short[cfg.bufSize/2];
_sampleBuffer = new short[cfg.bufSize * cfg.channels];
}
catch (std::bad_alloc const &ba)
{
Expand Down

2 comments on commit c2f7a1d

@ruby-R53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting the same error on this one too, and for some reason github won't load the comments on the previous commit so i dunno what you commented there :/

@drfiemost
Copy link
Member Author

@drfiemost drfiemost commented on c2f7a1d Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the size is the same as before for mono and double for stereo, it shouldn't crash anymore...

Can you please double-check?

Please sign in to comment.