Close the bold tag correctly.
This commit is contained in:
1 parent
3bf6d614b6
commit
3ed5ca860a
2 files changed
+4
-4
No files matched your search
@@ -307,8 +307,8 @@ OSStatus DecoderDataProc(AudioConverterRef inAudioConverter,
|
|||||||
|
|
||||||
- (void)DecoderThreadMainRoutine:(id)sender
|
- (void)DecoderThreadMainRoutine:(id)sender
|
||||||
{
|
{
|
||||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
|
|
||||||
// set up buffers and data proc info struct
|
// set up buffers and data proc info struct
|
||||||
decoderData.srcBufferSize = 32768;
|
decoderData.srcBufferSize = 32768;
|
||||||
@@ -323,7 +323,7 @@ OSStatus DecoderDataProc(AudioConverterRef inAudioConverter,
|
|||||||
AudioStreamPacketDescription* outputPktDescs = NULL;
|
AudioStreamPacketDescription* outputPktDescs = NULL;
|
||||||
int outputSizePerPacket = decoderData.outputFormat.mBytesPerPacket; // this will be non-zero if the format is CBR
|
int outputSizePerPacket = decoderData.outputFormat.mBytesPerPacket; // this will be non-zero if the format is CBR
|
||||||
UInt32 theOutputBufSize = 32768;
|
UInt32 theOutputBufSize = 32768;
|
||||||
char* outputBuffer = (char*)malloc(theOutputBufSize);
|
char *outputBuffer = (char *)malloc(theOutputBufSize);
|
||||||
|
|
||||||
UInt32 numOutputPackets = theOutputBufSize / outputSizePerPacket;
|
UInt32 numOutputPackets = theOutputBufSize / outputSizePerPacket;
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ static void insertTagsFromStyleRecord(style_record record, NSMutableString *samp
|
|||||||
insertTag(@"</i>", sampleText, &index, fontStyles, kStyleItalic, kTagClose);
|
insertTag(@"</i>", sampleText, &index, fontStyles, kStyleItalic, kTagClose);
|
||||||
|
|
||||||
if (!(record.fontStyles & kStyleBold) && *fontStyles & kStyleBold)
|
if (!(record.fontStyles & kStyleBold) && *fontStyles & kStyleBold)
|
||||||
insertTag(@"</b>", sampleText, &index, fontStyles, kStyleBold, kStyleColor);
|
insertTag(@"</b>", sampleText, &index, fontStyles, kStyleBold, kTagClose);
|
||||||
|
|
||||||
|
|
||||||
if ((!(record.fontStyles & kStyleColor) && *fontStyles & kStyleColor))
|
if ((!(record.fontStyles & kStyleColor) && *fontStyles & kStyleColor))
|
||||||
|
|||||||
Reference in new issue
Block a user