Skip to content
This repository was archived by the owner on Oct 31, 2022. It is now read-only.

Commit fbbd54b

Browse files
committed
Comments clarifications
1 parent 6439107 commit fbbd54b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

external/hap/hap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,9 @@ unsigned int HapDecode(const void *inputBuffer, unsigned long inputBufferBytes,
585585

586586
if (result == HapResult_No_Error)
587587
{
588+
/*
589+
Perform decompression
590+
*/
588591
bytesUsed = running_uncompressed_chunk_size;
589592

590593
callback((HapDecodeWorkFunction)hap_decode_chunk, chunk_info, chunk_count, info);
@@ -647,7 +650,7 @@ unsigned int HapDecode(const void *inputBuffer, unsigned long inputBufferBytes,
647650
return HapResult_Bad_Frame;
648651
}
649652
/*
650-
Fill out the remaining return values
653+
Fill out the remaining return value
651654
*/
652655
if (outputBufferBytesUsed != NULL)
653656
{

external/hap/hap.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ unsigned long HapMaxEncodedLength(unsigned long inputBytes);
6868

6969
/*
7070
Encodes inputBuffer which is a buffer containing texture data of format textureFormat, or returns an error.
71-
Use HapMaxEncodedLength() to discover the minimal value for outputBufferBytes
71+
Use HapMaxEncodedLength() to discover the minimal value for outputBufferBytes.
7272
If this returns HapResult_No_Error and outputBufferBytesUsed is not NULL then outputBufferBytesUsed will be set
7373
to the actual encoded length of the output buffer.
7474
*/
@@ -77,10 +77,12 @@ unsigned int HapEncode(const void *inputBuffer, unsigned long inputBufferBytes,
7777
unsigned long *outputBufferBytesUsed);
7878

7979
/*
80-
Decodes inputBuffer which is a Hap frame. If the frame permits multithreaded decoding, callback will be called
81-
once for you to invoke a platform-appropriate mechanism to assign work to threads, and trigger that work by calling
82-
the function passed to your callback the number of times indicated by the count argument, usually from a number
83-
of different threads.
80+
Decodes inputBuffer which is a Hap frame.
81+
82+
If the frame permits multithreaded decoding, callback will be called once for you to invoke a platform-appropriate
83+
mechanism to assign work to threads, and trigger that work by calling the function passed to your callback the number
84+
of times indicated by the count argument, usually from a number of different threads. This callback must not return
85+
until all the work has been completed.
8486
8587
void MyHapDecodeCallback(HapDecodeWorkFunction function, void *p, unsigned int count, void *info)
8688
{

0 commit comments

Comments
 (0)