File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1129,6 +1129,11 @@ class ProgressStream : public AudioStream {
1129
1129
setStream (stream);
1130
1130
}
1131
1131
1132
+ ProgressStream (AudioStream &stream){
1133
+ setStream (stream);
1134
+ p_info_from = &stream;
1135
+ }
1136
+
1132
1137
ProgressStreamInfo& defaultConfig () {
1133
1138
return progress_info;
1134
1139
}
@@ -1151,16 +1156,23 @@ class ProgressStream : public AudioStream {
1151
1156
p_print =&print;
1152
1157
}
1153
1158
1159
+ bool begin () override {
1160
+ if (p_info_from!=nullptr ){
1161
+ setAudioInfo (p_info_from->audioInfo ());
1162
+ }
1163
+ return AudioStream::begin ();
1164
+ }
1165
+
1154
1166
// / Updates the total size and restarts the percent calculation: Same as calling setSize()
1155
1167
bool begin (size_t len){
1156
1168
setSize (len);
1157
- return AudioStream:: begin ();
1169
+ return begin ();
1158
1170
}
1159
1171
1160
1172
bool begin (ProgressStreamInfo info){
1161
1173
progress_info = info;
1162
1174
setAudioInfo (info);
1163
- return AudioStream:: begin ();
1175
+ return begin ();
1164
1176
}
1165
1177
1166
1178
// / Updates the total size and restarts the percent calculation
@@ -1223,6 +1235,7 @@ class ProgressStream : public AudioStream {
1223
1235
ProgressStreamInfo progress_info;
1224
1236
Stream *p_stream=nullptr ;
1225
1237
Print *p_print=nullptr ;
1238
+ AudioInfoDependent *p_info_from=nullptr ;
1226
1239
size_t total_processed = 0 ;
1227
1240
1228
1241
size_t measure (size_t len) {
You can’t perform that action at this time.
0 commit comments