`Page 1/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`1
`+++++¬
`…
`¬2
`Copyright (c) 2001 BeComm Corporation¬
`3
`¬4
`Filename:¬
`5
`¬6
` sampleclock.c¬
`7
`¬8
`Group Name:¬
`9
`¬10
` todo¬
`11
`¬12
`Group Overview:¬
`13
`¬14
` todo¬
`15
`¬16
`Owner:¬
`17
`¬18
` Guy Carpenter (guyc) 16-Aug-2001¬
`19
`¬20
`--------------------------------------------------------------------------
`21
`---*/¬
`…
`#define SOS_DEBUG_ZONE "/classes/sampleclock"¬
`22
`¬23
`#include <sosstrings.h>¬
`24
`#include <sosmultimedia.h>¬
`25
`¬26
`SOS_SOURCE_VERSION (¬
`27
` "$Id: sampleclock.c,v 1.13 2001/10/23 16:40:01 guyc Exp $"¬
`28
`);¬
`29
`¬30
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`31
`+++++¬
`…
`Definitions¬
`32
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`33
`+++*/¬
`…
`#define SAMPLECLOCK_CLASS_NAME "sampleclock"¬
`34
`#define SAMPLECLOCK_SCHEME_NAME "sampleclock"¬
`35
`¬36
`#define LOCK(C) SOS_Lock_Acquire(C->Lock)¬
`37
`#define UNLOCK(C) SOS_Lock_Release(C->Lock)¬
`38
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`39
`+++++¬
`…
`globals¬
`40
`
`Page 1 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 2/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`41
`+++*/¬
`…
`static¬
`42
`SOS_REGOBJECTCLASS * g_SampleClockClass = NULL;¬
`43
`¬44
`static¬
`45
`SOS_STRINGTABLE * g_NamedClockTable = NULL;¬
`46
`¬47
`static¬
`48
`SOS_LOCK * g_NamedClockTableLock = NULL;¬
`49
`¬50
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`51
`+++++¬
`…
`Macros¬
`52
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`53
`+++*/¬
`…
`¬54
`#define RESOLVE(O) SOS_REGOBJECT_RESOLVE(O,g_SampleClockClass)¬
`55
`#define ISVALID(O) SOS_REGOBJECT_ISVALID(O,g_SampleClockClass)¬
`56
`#define IRESOLVE(I) SOS_INTERFACE_RESOLVE(I,g_SampleClockClass)¬
`57
`#define IISVALID(I) SOS_INTERFACE_ISVALID(I,g_SampleClockClass)¬
`58
`¬59
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`60
`+++++¬
`…
`Types¬
`61
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`62
`+++*/¬
`…
`¬63
`typedef struct _SAMPLECLOCK {¬
`64
` SOS_CLOCK_TICK Time;¬
`65
` SOS_UINT32 Sample;¬
`66
` SOS_UINT32 Frequency;¬
`67
` SOS_UINT32 Divisor;¬
`68
` SOS_BOOLEAN IsSet;¬
`69
` SOS_LOCK * Lock;¬
`70
` char * Name;¬
`71
`} SAMPLECLOCK;¬
`72
`¬73
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`74
`+++++¬
`…
`Basic Object Methods¬
`75
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`76
`+++*/¬
`…
`static¬
`77
`SOS_STATUS¬
`78
`
`Page 2 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 3/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`SampleClock_Init(¬
`79
` SOS_REGOBJECT * Object¬
`80
`)¬
`81
`{¬
`82
` SOS_STATUS status = SOS_Success;¬
`83
`¬84
` SAMPLECLOCK *sampleclock = SOS_Mem_Alloc(sizeof(SAMPLECLOCK));¬
`85
` SOS_memset(sampleclock, 0, sizeof(SAMPLECLOCK));¬
`86
`¬87
` /* lock the sampleclock until the first call to set */¬
`88
` sampleclock->Lock = SOS_Lock_Create();¬
`89
` ¬
`90
` SOS_RegObject_DataPut(Object, sampleclock);¬
`91
` ¬
`92
` return status;¬
`93
`}¬
`94
`¬95
`static¬
`96
`void¬
`97
`SampleClock_Uninit(¬
`98
` SOS_REGOBJECT * Object¬
`99
`)¬
`100
`{¬
`101
` if (ISVALID(Object)) {¬
`102
` SAMPLECLOCK *sampleclock = RESOLVE(Object);¬
`103
`¬
`104
` if (sampleclock->Name) {¬
`105
` SOS_StringTable_ElementRemove(¬
`106
` g_NamedClockTable,¬
`107
` sampleclock->Name,¬
`108
` NULL¬
`109
` );¬
`110
` }¬
`111
`¬
`112
` SOS_Lock_Destroy(sampleclock->Lock);¬
`113
` SOS_Mem_Free(sampleclock->Name);¬
`114
` SOS_Mem_Free(sampleclock);¬
`115
` }¬
`116
`}¬
`117
`¬
`118
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`119
`+++++¬
`…
`Support functions¬
`120
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`121
`+++*/¬
`…
`
`Page 3 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 4/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`122
`123
`124
`125
`126
`127
`128
`129
`130
`131
`132
`133
`134
`135
`136
`137
`138
`139
`140
`141
`142
`143
`144
`145
`146
`147
`148
`149
`150
`151
`152
`153
`154
`155
`156
`…
`157
`158
`…
`159
`160
`161
`162
`163
`164
`
`static¬
`void¬
`FactorReduce(¬
` SOS_UINT32 *Numerator,¬
` SOS_UINT32 *Denominator¬
`)¬
`{¬
` SOS_UINT32 numerator = *Numerator;¬
` SOS_UINT32 denominator = *Denominator;¬
` SOS_UINT32 factor=2;¬
`¬
` while (factor<=numerator && factor<=denominator) {¬
` if (!(numerator%factor) &&¬
` !(denominator%factor)) {¬
` numerator/=factor;¬
` denominator/=factor;¬
` } else {¬
` if (factor>2) factor++;¬
` factor++;¬
` }¬
` }¬
`¬
` SOS_DEBUGOUT_MINOR_EVENT(¬
` "Rationalized %lu/%lu to %lu/%lu\n",¬
` *Numerator,¬
` *Denominator,¬
` numerator,¬
` denominator¬
` );¬
`¬
` *Numerator = numerator;¬
` *Denominator = denominator;¬
`}¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`static¬
`SOS_STATUS¬
`SampleClock_NameSet(¬
` SOS_REGOBJECT * ClockObject,¬
` const char * Name¬
`)¬
`
`Page 4 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 5/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`165
`166
`167
`168
`169
`170
`171
`172
`173
`174
`175
`176
`177
`178
`179
`180
`181
`182
`183
`184
`185
`186
`187
`188
`189
`190
`191
`192
`193
`194
`195
`196
`197
`198
`199
`200
`201
`202
`203
`204
`205
`206
`207
`208
`209
`
`{¬
` SAMPLECLOCK * clock = RESOLVE(ClockObject);¬
` SOS_STATUS status;¬
` if (!Name || !*Name) {¬
` /* clock is unnamed */¬
` status = SOS_Success;¬
` } else if (clock && !clock->Name) {¬
` clock->Name = SOS_strdup(Name);¬
` if (clock->Name) {¬
` status = SOS_StringTable_ElementPut(¬
` g_NamedClockTable,¬
` clock->Name,¬
` ClockObject¬
` );¬
` } else {¬
` status = SOS_ErrorResourceAllocation;¬
` }¬
` } else {¬
` status = SOS_ErrorParameter;¬
` }¬
` ¬
` return status;¬
`}¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_GetByName(¬
` const char * Name,¬
` SOS_REGOBJECT ** ClockObject¬
`)¬
`{¬
` SOS_STATUS status;¬
`¬
` status = SOS_StringTable_ElementPeek(¬
` g_NamedClockTable,¬
` Name,¬
` (void**)ClockObject¬
` );¬
`¬
` if (SOS_SUCCEEDED(status)) {¬
` SOS_RegObject_Reference(*ClockObject);¬
` }¬
`¬
` return status;¬
`}¬
`
`Page 5 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 6/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`210
`211
`212
`213
`214
`215
`216
`217
`218
`219
`220
`221
`222
`223
`224
`225
`226
`227
`228
`229
`230
`231
`232
`233
`234
`235
`236
`237
`238
`239
`240
`241
`242
`243
`244
`…
`245
`246
`…
`247
`248
`249
`250
`251
`252
`
`¬
`static¬
`SOS_STATUS¬
`SampleClock_FindOrCreateByName(¬
` const char * Name,¬
` SOS_REGOBJECT ** ClockObject¬
`)¬
`{¬
` SOS_STATUS status;¬
` ¬
` SOS_Lock_Acquire(g_NamedClockTableLock);¬
`¬
` if (Name && *Name) {¬
` status = SampleClock_GetByName(Name, ClockObject);¬
` } else {¬
` status = SOS_Error;¬
` }¬
` ¬
` if (!SOS_SUCCEEDED(status)) {¬
` *ClockObject = SOS_RegObject_Create(g_SampleClockClass);¬
` status = SampleClock_NameSet(*ClockObject, Name);¬
` } ¬
` ¬
` SOS_Lock_Release(g_NamedClockTableLock);¬
`¬
`¬
` SOS_DEBUGOUT_DETAIL("Created sampleclock %s at %p\n",¬
` (Name && *Name) ? Name : "<unnamed>",¬
` *ClockObject¬
` );¬
`¬
` return status;¬
`}¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`CreateFromString Interface¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_CreateFromString (¬
` SOS_ICREATEFROMSTRING * ICreateFromString,¬
` const char * String,¬
`
`Page 6 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 7/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`253
`254
`255
`256
`257
`258
`259
`260
`261
`262
`263
`264
`265
`266
`267
`268
`269
`270
`271
`…
`272
`273
`…
`274
`275
`276
`277
`278
`279
`280
`281
`282
`283
`284
`285
`286
`287
`288
`289
`290
`291
`292
`293
`294
`295
`
` SOS_REGOBJECT ** Object¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
`¬
` SOS_DEBUGOUT_FUNC_TRACE("SampleClock_CreateFromString\n");¬
`¬
` if (Object) {¬
` status = SampleClock_FindOrCreateByName(¬
` String,¬
` Object¬
` );¬
` } else {¬
` status = SOS_ErrorParameter;¬
` }¬
`¬
` return status;¬
`}¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`SampleClock Interface¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_FrequencySet(¬
` SOS_ISAMPLECLOCK * Interface,¬
` SOS_UINT32 Frequency,¬
` SOS_UINT32 Divisor¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
`¬
` if (!IISVALID(Interface)) {¬
` /* invalid object */¬
` status = SOS_ErrorParameter;¬
` } else if (Divisor==0) {¬
` /* invalid divisor */¬
` SOS_ASSERT_ASSUMPTION(¬
` Divisor!=0,¬
` "SampleClock_FrequencySet called with Divisor of 0"¬
` );¬
` status = SOS_ErrorParameter;¬
` } else {¬
`
`Page 7 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 8/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`296
`297
`298
`299
`300
`301
`302
`303
`304
`305
`306
`307
`308
`309
`310
`311
`312
`313
`314
`315
`316
`…
`317
`318
`319
`320
`321
`322
`323
`324
`325
`326
`327
`328
`329
`330
`331
`332
`333
`334
`335
`336
`337
`338
`339
`
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);¬
`¬
` /*¬
` * We first remove any common factors with no loss of¬
` * accuracy.¬
` */¬
` FactorReduce(&Frequency, &Divisor);¬
`¬
` /*¬
` * If the product of these values is larger than 2^32-1¬
` * we can get overflows in the epoch calculation. We have to¬
` * reduce them to make sure that isn't possible.¬
` *¬
` * REVISIT - the loss of accuracy here is small, but could still¬
` * countered for using the same technique we use for the epoch¬
` * calculations - store the remainder and apply that to the¬
` * final calculation.¬
` */¬
` while (((Frequency*Divisor)/Divisor)!=Frequency) {¬
` SOS_DEBUGOUT_MINOR_EVENT(¬
` "Reducing sample clock ratio from %lu/%lu to %lu/%lu to
`avoid overflow\n",¬
` Frequency,¬
` Divisor,¬
` Frequency>>1,¬
` Divisor>>1¬
` );¬
` Divisor>>=1;¬
` Frequency>>=1;¬
` }¬
` sampleclock->Frequency = Frequency;¬
` sampleclock->Divisor = Divisor;¬
` sampleclock->Time = SOS_Clock_TickGet();¬
` sampleclock->Sample = 0;¬
`¬
` ¬
` SOS_ASSERT_ASSUMPTION(¬
` (Frequency*Divisor)/Divisor==Frequency,¬
` "Overflow in sample clock values"¬
` );¬
`¬
` }¬
`¬
` return status;¬
`}¬
`
`Page 8 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 9/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`340
`341
`342
`343
`344
`345
`346
`347
`348
`349
`350
`351
`352
`353
`354
`355
`356
`357
`358
`359
`360
`361
`362
`363
`364
`365
`366
`367
`368
`369
`370
`371
`372
`373
`374
`375
`376
`377
`378
`379
`380
`381
`382
`383
`384
`
`¬
`¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_FrequencyGet(¬
` SOS_ISAMPLECLOCK * Interface,¬
` SOS_UINT32 * Frequency,¬
` SOS_UINT32 * Divisor¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
`¬
` if (IISVALID(Interface)) {¬
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);¬
`¬
` if (Frequency) {¬
` *Frequency = sampleclock->Frequency;¬
` }¬
` if (Divisor) {¬
` *Divisor = sampleclock->Divisor;¬
` }¬
` } else {¬
` status = SOS_ErrorParameter;¬
` }¬
` ¬
` return status;¬
`}¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_Update(¬
` SOS_ISAMPLECLOCK * Interface,¬
` SOS_CLOCK_TICK Time,¬
` SOS_UINT32 Sample¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
`¬
` if (IISVALID(Interface)) {¬
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);¬
`¬
` SOS_ASSERT_ASSUMPTION(¬
` Sample==0 || sampleclock->Frequency!=0,¬
` "Update of improperly initialized clock\n"¬
`
`Page 9 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 10/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`385
`386
`387
`388
`389
`390
`391
`392
`393
`394
`395
`396
`397
`398
`399
`400
`401
`402
`403
`404
`405
`406
`407
`408
`409
`410
`411
`412
`413
`414
`415
`416
`417
`418
`419
`420
`421
`422
`423
`424
`425
`426
`427
`428
`429
`
` );¬
`¬
` SOS_DEBUGOUT_MINOR_EVENT(¬
` "Updating clock %x to sample %lu at %lu\n",¬
` Time,¬
` Sample¬
` );¬
`¬
` /*¬
` * If the clock hasn't been started we must¬
` */¬
` LOCK(sampleclock);¬
`¬
` sampleclock->Time = Time;¬
` sampleclock->Sample = Sample;¬
` sampleclock->IsSet = SOS_True;¬
`¬
` UNLOCK(sampleclock);¬
`¬
` } else {¬
` /* not a valid interface */¬
` status = SOS_ErrorParameter;¬
` }¬
`¬
` return status;¬
`}¬
`¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_EpochGet(¬
` SOS_ISAMPLECLOCK * Interface,¬
` SOS_CLOCK_TICK * Epoch¬
`)¬
`{¬
` SOS_CLOCK_TICK epoch = 0;¬
` SOS_STATUS status = SOS_Success;¬
`¬
` if (IISVALID(Interface)) {¬
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);¬
` LOCK(sampleclock);¬
` if (Epoch) {¬
` if (!sampleclock->IsSet) {¬
` SOS_DEBUGOUT_MAJOR_EVENT(¬
` "Sample clock %p not set\n",¬
`
`Page 10 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 11/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`430
`431
`432
`433
`434
`435
`436
`437
`438
`439
`440
`441
`442
`443
`444
`445
`446
`447
`…
`448
`449
`450
`451
`452
`453
`454
`455
`456
`457
`458
`459
`460
`461
`462
`463
`464
`465
`466
`467
`468
`469
`470
`471
`472
`473
`
` Interface->Interface.Object¬
` );¬
` status = SOS_ErrorParameter;¬
` } else if (sampleclock->Sample==0 && sampleclock->IsSet) {¬
` /*¬
` * Special case - if sample is 0 we don't¬
` * need to compute the epoch - we know it,¬
` * and we don't need to even have a frequency¬
` * and divisor set.¬
` */¬
` epoch = sampleclock->Time;¬
` } else if (sampleclock->Frequency) {¬
` SOS_UINT32 whole =¬
` sampleclock->Sample / sampleclock->Frequency;¬
` SOS_UINT32 remain =¬
` sampleclock->Sample % sampleclock->Frequency;¬
` SOS_UINT32 delta = whole * sampleclock->Divisor +¬
` remain * sampleclock->Divisor /
`sampleclock->Frequency;¬
` epoch = sampleclock->Time - delta;¬
`¬
` SOS_DEBUGOUT_MINOR_EVENT(¬
` "SampleClock %lu/%lu %lu@%lu Epoch %lu\n",¬
` sampleclock->Frequency,¬
` sampleclock->Divisor,¬
` sampleclock->Sample,¬
` sampleclock->Time,¬
` epoch¬
` );¬
` ¬
` } else {¬
` /* Frequency is 0 - or unspecified, and Sample!=0 */¬
` SOS_DEBUGOUT_MAJOR_EVENT(¬
` "Sample clock frequency not set\n"¬
` );¬
` status = SOS_ErrorParameter;¬
` }¬
` } else {¬
` /* out parameter is 0 */¬
` status = SOS_ErrorParameter;¬
` }¬
` UNLOCK(sampleclock);¬
` } else {¬
` /* not a valid interface */¬
` status = SOS_ErrorParameter;¬
`
`Page 11 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 12/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`474
`475
`476
`477
`478
`479
`480
`481
`482
`483
`484
`485
`486
`487
`488
`…
`489
`490
`…
`491
`492
`493
`494
`495
`496
`497
`498
`499
`500
`501
`502
`503
`504
`505
`506
`507
`508
`509
`510
`511
`512
`513
`514
`515
`516
`
` }¬
`¬
` if (Epoch) {¬
` *Epoch = epoch;¬
` }¬
`¬
` SOS_DEBUGOUT_FUNC_TRACE(¬
` "EpochGet returns %d\n",¬
` status);¬
`¬
` return status;¬
`}¬
`¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`Global initialization¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`static¬
`SOS_STATUS¬
`SampleClock_ClassInit (¬
` SOS_REGOBJECTCLASS *RegObjectClass,¬
` SOS_REGOBJECT *InitContext¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
`¬
` static const SOS_ISAMPLECLOCK iSampleClock = {¬
` SOS_INTERFACE_INIT,¬
` SampleClock_FrequencySet,¬
` SampleClock_FrequencyGet,¬
` SampleClock_Update,¬
` SampleClock_EpochGet¬
` };¬
`¬
` static const SOS_ICREATEFROMSTRING iCreateFromString = {¬
` SOS_INTERFACE_INIT,¬
` SampleClock_CreateFromString¬
` };¬
`¬
` g_SampleClockClass = SOS_RegObjectClass_Reference(RegObjectClass);¬
`¬
` status = SOS_RegObjectClass_InterfaceAdd(¬
` g_SampleClockClass,¬
`
`Page 12 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 13/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`517
`518
`519
`520
`521
`522
`523
`524
`525
`526
`527
`528
`529
`530
`531
`532
`533
`534
`535
`536
`537
`538
`539
`540
`541
`542
`543
`544
`545
`546
`547
`548
`549
`550
`551
`552
`553
`554
`555
`556
`557
`558
`559
`560
`561
`
` SOS_ISAMPLECLOCK_ID,¬
` &iSampleClock,¬
` sizeof(iSampleClock)¬
` );¬
`¬
` status = SOS_RegObjectClass_ClassInterfaceAdd(¬
` g_SampleClockClass,¬
` SOS_ICREATEFROMSTRING_ID,¬
` &iCreateFromString,¬
` sizeof(iCreateFromString)¬
` );¬
`¬
` SOS_Registry_SchemeRegister(¬
` g_SampleClockClass,¬
` SAMPLECLOCK_SCHEME_NAME¬
` );¬
`¬
` g_NamedClockTable = SOS_StringTable_Create(NULL,NULL,NULL);¬
` g_NamedClockTableLock = SOS_Lock_Create();¬
` ¬
` return status;¬
`}¬
`¬
`¬
`static¬
`SOS_STATUS¬
`SampleClock_ClassUninit(¬
` SOS_REGOBJECTCLASS *RegObjectClass¬
`)¬
`{¬
` SOS_StringTable_Destroy(g_NamedClockTable);¬
` g_NamedClockTable = NULL;¬
` SOS_Lock_Destroy(g_NamedClockTableLock);¬
` g_NamedClockTableLock = NULL;¬
`¬
` SOS_Registry_SchemeUnregister(¬
` g_SampleClockClass,¬
` SAMPLECLOCK_SCHEME_NAME¬
` );¬
`¬
` SOS_RegObjectClass_Release(g_SampleClockClass);¬
`¬
` return SOS_Success;¬
`}¬
`¬
`
`Page 13 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 14/14
`Saved: 10/23/01, 11:40:01 AM
`Printed for: Implicit
`
`¬
`¬
`SOS_STATUS¬
`SOS_ModuleInit(¬
` SOS_OBJECTFILE* ObjectFile,¬
` SOS_REGOBJECT* RegistryHandle¬
`)¬
`{¬
` SOS_REGOBJECTCLASS *class = SOS_RegObjectClass_Register(¬
` ObjectFile,¬
` SAMPLECLOCK_CLASS_NAME,¬
` NULL, /* class context */¬
` SampleClock_ClassInit,¬
` SampleClock_ClassUninit,¬
` SampleClock_Init,¬
` SampleClock_Uninit¬
` );¬
`¬
` /*¬
` * Immediately release this class.¬
` * It may not be returned in future versions.¬
` */¬
` SOS_RegObjectClass_Release(class);¬
`¬
` return SOS_Success;¬
`}¬
`¬
`void¬
`SOS_ModuleUninit(¬
` SOS_OBJECTFILE* ObjectFile¬
`)¬
`{¬
`}¬
`¬
`¬
`
`562
`563
`564
`565
`566
`567
`568
`569
`570
`571
`572
`573
`574
`575
`576
`577
`578
`579
`580
`581
`582
`583
`584
`585
`586
`587
`588
`589
`590
`591
`592
`593
`594
`595
`596
`597
`
`Page 14 of 14
`
`Implicit Exhibit 2088
`Sonos v. Implicit, IPR2018-0766, -0767
`
`