View Single Post
Old 30th November 2015, 15:29   #153
pbelkner
Senior Member
 
Join Date: Jun 2010
Posts: 405
Quote:
Originally Posted by djnforce9 View Post
Certain songs still hang for me regardless of my settings
On my site there's no such problem. The final step in filling the buffer is from 3768 to 4655 frames. After this step there are more frames in the buffer then the threshold of 4608 (4032 in your case) and the audio client starts as expected:
PHP Code:
open
  wasapi clock
  REQUEST_OPEN
  samplerate
44100
  numchannels
2
  bitspersamp
24
  audio client created
  got device period
    
default: 100000 hns
    minimum
30000 hns
    choosen
100000 hns
  device period scaled by 7.00 
(device period700400)
  
intitializing audio client with 700400/0 hns
  audio client initialized
  share mode
EXCLUSIVE
  audio clock created
  SHARED BUFFER SIZE
4096 frames
  START AUDIO CLIENT
4608 frames
  audio render client created
  RING BUFFER SIZE
6336 frames (1.55)
  
ring buffer created
  uFramesAvailable
47uFramesMin4608 (6336)
  
uFramesAvailable312uFramesMin4608 (6336)
  
uFramesAvailable1199uFramesMin4608 (6336)
  
uFramesAvailable1464uFramesMin4608 (6336)
  
uFramesAvailable2351uFramesMin4608 (6336)
  
uFramesAvailable2616uFramesMin4608 (6336)
  
uFramesAvailable3503uFramesMin4608 (6336)
  
uFramesAvailable3768uFramesMin4608 (6336)
  
uFramesAvailable4655uFramesMin4608 (6336)
  
uFrames4096uFramesPadding0uFramesWrite4096uFramesRing4655q0.50bFlush0
  audio client started
  uFrames
4096uFramesPadding2320uFramesWrite1776uFramesRing5432q0.50bFlush0
  uFrames
4096uFramesPadding2025uFramesWrite2071uFramesRing5960q0.50bFlush0
  uFrames
4096uFramesPadding2020uFramesWrite2076uFramesRing5732q0.50bFlush
The step from 3768 to 4655 frames should be possible in your case as well because your ring buffer is configurated to hold up to 5760 frames.

The only thing I can propose for now is to have a another, deeper look into what's going on. Before writing the next batch Winamp issues a "canwrite" request which should return the available/free space in bytes. The only thing I can imagine is that Winamp comes to the conclusion that there's not enough space because of such a "canwrite" call and from then on forever issues "canwrite" calls.

In order to test this I have introduced further trace information into a new debug version which you can download from here. In "verbose 2" level the new debug version traces what YASAPI replys to "canwrite":
PHP Code:
open
  wasapi clock
  REQUEST_OPEN
  samplerate
44100
  numchannels
2
  bitspersamp
24
  audio client created
  got device period
    
default: 100000 hns
    minimum
30000 hns
    choosen
100000 hns
  device period scaled by 7.00 
(device period700400)
  
intitializing audio client with 700400/0 hns
  audio client initialized
  share mode
EXCLUSIVE
  audio clock created
  SHARED BUFFER SIZE
4096 frames
  START AUDIO CLIENT
4608 frames
  audio render client created
  RING BUFFER SIZE
6336 frames (1.55)
  
ring buffer created
canwrite
getoutputtime
  REQUEST_CANWRITE
  free
6336 frames (38016 bytes)
getoutputtime
  REQUEST_GETTIME
canwrite
  REQUEST_GETTIME
  REQUEST_CANWRITE
  free
6336 frames (38016 bytes)
write
  REQUEST_WRITE
  uFramesAvailable
47uFramesMin4608 (6336)
write
  REQUEST_WRITE
  uFramesAvailable
312uFramesMin4608 (6336)
canwrite
  REQUEST_CANWRITE
  free
6024 frames (36144 bytes)
write
  REQUEST_WRITE
  uFramesAvailable
1199uFramesMin4608 (6336)
write
  REQUEST_WRITE
  uFramesAvailable
1464uFramesMin4608 (6336)
canwrite
  REQUEST_CANWRITE
  free
4872 frames (29232 bytes)
getoutputtime
write
getoutputtime
  REQUEST_GETTIME
  REQUEST_WRITE
  uFramesAvailable
2351uFramesMin4608 (6336)
  
REQUEST_GETTIME
write
  REQUEST_WRITE
  uFramesAvailable
2616uFramesMin4608 (6336)
canwrite
  REQUEST_CANWRITE
  free
3720 frames (22320 bytes)
write
  REQUEST_WRITE
  uFramesAvailable
3503uFramesMin4608 (6336)
write
  REQUEST_WRITE
  uFramesAvailable
3768uFramesMin4608 (6336)
canwrite
  REQUEST_CANWRITE
  free
2568 frames (15408 bytes)
write
  REQUEST_WRITE
  uFramesAvailable
4655uFramesMin4608 (6336)
  
uFrames4096uFramesPadding0uFramesWrite4096uFramesRing4655q0.50bFlush0
getoutputtime
  audio client started 
It would be great if you could provide a such a "verbose 2" trace with the new debug version.
pbelkner is offline   Reply With Quote