File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,16 @@ template <class FileType> class FileLoopT : public AudioStream {
50
50
// / defines the start position after the rewind. E.g. for wav files this should be 44
51
51
void setStartPos (int pos) { start_pos = pos; }
52
52
53
- // / defines the requested playing size in bytes
53
+ // / optionally defines the requested playing size in bytes
54
54
void setSize (size_t len) {
55
55
total_size = len;
56
56
}
57
57
58
+ // / Returns the (requested) file size
59
+ size_t size () {
60
+ return total_size == -1 ? current_file.size () : total_size;
61
+ }
62
+
58
63
// / You can be notified about a rewind
59
64
void setCallback (void (*cb)(FileLoopT &loop)){
60
65
callback = cb;
@@ -107,15 +112,11 @@ template <class FileType> class FileLoopT : public AudioStream {
107
112
return result;
108
113
}
109
114
115
+ // Returns the bool of the current file
110
116
operator bool () {
111
117
return current_file;
112
118
}
113
119
114
- // / Returns the (requested) file size
115
- size_t size () {
116
- return total_size == -1 ? current_file.size () : total_size;
117
- }
118
-
119
120
// / @return true as long as we are looping
120
121
bool isLoopActive () { return loop_count > 0 || loop_count == -1 ; }
121
122
You can’t perform that action at this time.
0 commit comments