aboutsummaryrefslogtreecommitdiff
path: root/src/myriadstream.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-09-14 07:10:06 +0000
committerMike Buland <eichlan@xagasoft.com>2010-09-14 07:10:06 +0000
commitd210c301bc3e8867cad883e80663208474cc1ea5 (patch)
treecf79adc2952c20dfc5c8c051b3a0d907c4f7d9c7 /src/myriadstream.cpp
parent29ab73673e547abd20fc1a98e6ae642b11952808 (diff)
downloadlibbu++-d210c301bc3e8867cad883e80663208474cc1ea5.tar.gz
libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.tar.bz2
libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.tar.xz
libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.zip
Quite exciting, really. That lurking myriad bug has been found, it was not
forcing a header update when a stream changed size, but did not require additional blocks to be linked in. Kind of strange, but it's fixed now. A little more testing and I think it'll be ready.
Diffstat (limited to '')
-rw-r--r--src/myriadstream.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/myriadstream.cpp b/src/myriadstream.cpp
index 6623b2b..74dca04 100644
--- a/src/myriadstream.cpp
+++ b/src/myriadstream.cpp
@@ -6,15 +6,18 @@
6 */ 6 */
7 7
8#include "bu/myriadstream.h" 8#include "bu/myriadstream.h"
9#include "bu/sio.h"
10
11using Bu::sio;
12using Bu::Fmt;
13 9
14#include <string.h> 10#include <string.h>
15 11
16// #define MYRIAD_STREAM_DEBUG 1 12// #define MYRIAD_STREAM_DEBUG 1
17 13
14#ifdef MYRIAD_STREAM_DEBUG
15#include "bu/sio.h"
16
17using Bu::sio;
18using Bu::Fmt;
19#endif
20
18Bu::MyriadStream::MyriadStream( Bu::Myriad &rMyriad, 21Bu::MyriadStream::MyriadStream( Bu::Myriad &rMyriad,
19 Bu::Myriad::Stream *pStream ) : 22 Bu::Myriad::Stream *pStream ) :
20 rMyriad( rMyriad ), 23 rMyriad( rMyriad ),
@@ -203,6 +206,7 @@ size_t Bu::MyriadStream::write( const void *pBuf, size_t nBytes )
203 ); 206 );
204 iPos += iAmnt; 207 iPos += iAmnt;
205 pStream->iSize += iAmnt; 208 pStream->iSize += iAmnt;
209 rMyriad.headerChanged();
206 pBuf = &((char *)pBuf)[iAmnt]; 210 pBuf = &((char *)pBuf)[iAmnt];
207 iLeft -= iAmnt; 211 iLeft -= iAmnt;
208 } 212 }