Realtime seekbar update
parent
3e221f7825
commit
94a1c93349
|
@ -8,6 +8,7 @@ If nothing is selected when the user presses play, the first song is selected an
|
|||
Double-clicking when out of focus now behaves as expected.
|
||||
Now has a simple dock menu courtesy of Nathanael Weldon <nathanael (at) mailblocks.com>.
|
||||
The playlist index now starts at 1.
|
||||
Seekbar now updates the time field as you drag it, Simon Savary <savary (at) oricom.ca>
|
||||
|
||||
0.04
|
||||
----
|
||||
|
|
Binary file not shown.
2
Sound.m
2
Sound.m
|
@ -28,7 +28,7 @@
|
|||
|
||||
//#define RING_BUFFER_SIZE 1048576
|
||||
//#define BUFFER_WRITE_CHUNK 32768
|
||||
#define FEEDER_THREAD_IMPORTANCE 10
|
||||
#define FEEDER_THREAD_IMPORTANCE 6
|
||||
|
||||
//timeout should be smaller than the time itd take for the buffer to run dry...looks like were ironclad
|
||||
#define TIMEOUT 1
|
||||
|
|
|
@ -131,7 +131,9 @@
|
|||
// DBLog(@"SEEKING?");
|
||||
double time;
|
||||
time = [positionSlider doubleValue];
|
||||
[self sendPortMessage:kCogSeekMessage withData:&time ofSize:(sizeof(double))];
|
||||
|
||||
if ([sender tracking] == NO) // check if user stopped sliding before playing audio
|
||||
[self sendPortMessage:kCogSeekMessage withData:&time ofSize: (sizeof(double))];
|
||||
|
||||
[self updateTimeField:time];
|
||||
}
|
||||
|
@ -312,9 +314,8 @@
|
|||
{
|
||||
// DBLog(@"Received pos update: %f", pos);
|
||||
[positionSlider setDoubleValue:pos];
|
||||
[self updateTimeField:pos];
|
||||
}
|
||||
|
||||
[self updateTimeField:pos];
|
||||
}
|
||||
else if (message == kCogStatusUpdateMessage)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue